R
Rainy
Hi,
I tried searching for this and did not find this issue. I only looked
at about dozen hits, I apologize if this is covered somewhere and I
missed it. Without much further ado, here's the thing (Win, Py2.5):
Traceback (most recent call last):
File "<pyshell#8>", line 1, in <module>
f.next()
IOError: [Errno 9] Bad file descriptor'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00
....many more lines of junk...'
I'm not actually trying to do something particular, I'm making snippets
of example code for all functions in LibRef and I ran into this, and
I'm just curious as to what's happening. I understand that you're not
supposed to call .next on a file open for writing. But I don't know why
and how it does what happened here; besides, I've seen the same thing
happen before when I was doing something else with file
open/write/close, but I don't remember the specifics.
I tried searching for this and did not find this issue. I only looked
at about dozen hits, I apologize if this is covered somewhere and I
missed it. Without much further ado, here's the thing (Win, Py2.5):
Traceback (most recent call last):
File "<pyshell#8>", line 1, in <module>
f.next()
IOError: [Errno 9] Bad file descriptor'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00
....many more lines of junk...'
I'm not actually trying to do something particular, I'm making snippets
of example code for all functions in LibRef and I ran into this, and
I'm just curious as to what's happening. I understand that you're not
supposed to call .next on a file open for writing. But I don't know why
and how it does what happened here; besides, I've seen the same thing
happen before when I was doing something else with file
open/write/close, but I don't remember the specifics.