the docs: sure, e.g:
https://docs.python.org/2.4/lib/bltin-file-objects.html look for seek: *seek*( *offset*[*, whence*]) Set the file's current position, like stdio's fseek(). The *whence* argument is optional and defaults to 0 (absolute file positioning); other values are 1 (seek relative to the current position) and 2 (seek relative to the file's end). There is no return value. Note that if the file is opened for appending (mode 'a' or 'a+'), any seek() operations will be undone at the next write. **********************************************^^^^^^^^^^^^^^^^^^^^^^^^^^^^ If the file is only opened for writing in append mode (mode 'a'), this method is essentially a no-op, but it remains useful for files opened in append mode with reading enabled (mode 'a+'). If the file is opened in text mode (without 'b'), only offsets returned by tell() are legal. Use of other offsets causes undefined behavior. Note that not all file objects are seekable. On Sunday, March 8, 2015 at 5:14:14 PM UTC+2, [email protected] wrote: > > hi, > after python 2.7.2, seek(0) on an opened file for append does not seek to > the begining - read the manual. > > so LockedFile(...) used by languages, is screwing up the language > translation file. > > I don't understand why the code does a seek(0)/truncate if not opened for > truncate, maybe it's > a windows issue? It's not working on UNix! > > danny > > -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.

