File objects and seek

Tommy Grav tgrav at mac.com
Tue Mar 28 18:05:13 CEST 2006


I have a file object that contains a binary read in file. I would  
like to
move to another position in the file to read in a record. seek seems
to work fine with a positive value, but not a negative one (moving
back from the current relative position). Is this the intended behavior?
How do I move backwards (towards the beginning) in the file?


Cheers
Tommy


tgrav at mac.com
http://homepage.mac.com/tgrav/

"Any intelligent fool can make things bigger,
more complex, and more violent. It takes a
touch of genius -- and a lot of courage --
to move in the opposite direction"
                          -- Albert Einstein


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20060328/f94301f0/attachment.html>


More information about the Python-list mailing list