zipfile.py, fp.seek(-22,2) error

2005-11-06 Thread Waitman Gobble
:03:29) [GCC 3.3.1 (cygming special)] on cygwin Type "help", "copyright", "credits" or "license" for more information. >>> ff=open("testdoc.odt","r") >>> ff.seek(-22,2) >>> ff.seek(0,2) >>> ff.seek(22,2) >>> ff.seek(0,0) >>> ff.seek(-22,2) >>> import zipfile >>> zf=zipfile.ZipFile("testdoc.odt") >>> seek doesn't mind going -22 from the end on a windows machine but hates doing it on a linux machine any idears Thanks and Best, Waitman Gobble -- http://mail.python.org/mailman/listinfo/python-list

Re: Validate string as UTF-8?

2005-11-06 Thread Waitman Gobble
I have done this using a sytem call to the program "recode". Recode a file UTF-8 and do a diff on the original and recoded files. Not an elegant solution but did seem to function properly. Take care, Waitman Gobble -- http://mail.python.org/mailman/listinfo/python-list

Re: zipfile.py, fp.seek(-22,2) error

2005-11-06 Thread Waitman Gobble
ok, i figured it out. the file i was trying to read on the linux machine was 0b. lol. i guess the "invalid argument" error was throwing me off. -- http://mail.python.org/mailman/listinfo/python-list