Problem using lseek
Michael Mayhew
mayhew at cis.ohio-state.edu
Wed Feb 5 08:26:00 EST 2003
Greetings,
I have been using Python faithfully for the past five months and am quite
happy having learned it. That being said, I am currently having a real
honey of a problem. I am trying to use the os module's lseek function to
set a file descriptor to a new offset position in a file. However, when
running the code through the interpreter, I continue receiving a
TypeError message:
Traceback (most recent call last):
File "testseq.py", line 18, in ?
os.lseek(somefile, someoffset, 1)
TypeError: an integer is required
I have already checked the type of someoffset and it is indeed an
integer. I have also read the library reference to make sure that no new
arguments to the function have been created. What else is needed for
this statement to function correctly, as I am passing a file descriptor,
an integer, and an integer, as the library reference requires. TIA.
Michael Mayhew
More information about the Python-list
mailing list