Re: File write() problem

2006-12-29 Thread Tim Roberts
[EMAIL PROTECTED] wrote: Alright, I realize this is probably very basic to be posted on this newsgroup but I cannot figure out what is causing my problem. Here is the code I am using below: from getpass import getpass configfile = file('config.txt', 'w') serverPassword = configfile.readline()

File write() problem

2006-12-27 Thread apriebe47
Alright, I realize this is probably very basic to be posted on this newsgroup but I cannot figure out what is causing my problem. Here is the code I am using below: from getpass import getpass configfile = file('config.txt', 'w') serverPassword = configfile.readline() if serverPassword ==

Re: File write() problem

2006-12-27 Thread Marc 'BlackJack' Rintsch
In [EMAIL PROTECTED], apriebe47 wrote: configfile = file('config.txt', 'w') serverPassword = configfile.readline() Here you open a file for writing and try to read a line. This raises an exception: In [1]: configfile = file('test.txt', 'w') In [2]: configfile.readline()

Re: File write() problem

2006-12-27 Thread apriebe47
Marc 'BlackJack' Rintsch wrote: configfile = file('config.txt', 'w') serverPassword = configfile.readline() Hrm. When I run the code that I posted I don't seem to get those errors. Please post the exact code you have trouble with. Don't retype it -- copy and paste it. from getpass

Re: File write() problem

2006-12-27 Thread rzed
[EMAIL PROTECTED] wrote in news:[EMAIL PROTECTED]: Marc 'BlackJack' Rintsch wrote: configfile = file('config.txt', 'w') serverPassword = configfile.readline() Hrm. When I run the code that I posted I don't seem to get those errors. Please post the exact code you have trouble with.