[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.readl
[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 t
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
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()
-
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 == '':