W
wordsender
Hey guys,
I can't figure this one out, why is this simple script giving me
problems?
logfile=file(r'test.txt','w')
logfile.write('datetime')
test=logfile.readlines()
When I run it I get the error message:
Traceback (most recent call last):
File "C:\Documents and Settings\Gregory\My Documents\Get New Great
Job\testfile.py", line 3, in ?
test=logfile.readlines()
IOError: [Errno 9] Bad file descriptor
I'm running Windows XP, Python 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC
v.1200 32 bit (Intel)] on win32
Any help would be greatly appricated.
Thanks,
Greg
I can't figure this one out, why is this simple script giving me
problems?
logfile=file(r'test.txt','w')
logfile.write('datetime')
test=logfile.readlines()
When I run it I get the error message:
Traceback (most recent call last):
File "C:\Documents and Settings\Gregory\My Documents\Get New Great
Job\testfile.py", line 3, in ?
test=logfile.readlines()
IOError: [Errno 9] Bad file descriptor
I'm running Windows XP, Python 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC
v.1200 32 bit (Intel)] on win32
Any help would be greatly appricated.
Thanks,
Greg