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()
---------------------------------------------------------------------------
exceptions.IOError                        Traceback (most recent call last)

/home/marc/<ipython console>

IOError: [Errno 9] Bad file descriptor


Please post the exact code you have trouble with.  Don't retype it -- copy
and paste it.

Ciao,
        Marc 'BlackJack' Rintsch
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to