SEEK_SET defined?
Peter Hansen
peter at engcorp.com
Wed Mar 29 07:21:41 EST 2006
Roger Miller wrote:
> I see that the posixfile module is deprecated. Have the SEEK_SET, etc.
> constants moved somewhere else, or do I need to define them myself?
In Python 2.5 they have been added to the os module, but for now I think
you are probably expected to just continue using posixfile or define
them yourself.
If you did define them yourself, maybe this would be best, given the
current situation:
import os
try:
os.SEEK_SET
except AttributeError:
os.SEEK_SET, os.SEEK_CUR, os.SEEK_END = range(3)
-Peter
More information about the Python-list
mailing list