Ross Ridge wrote: > tubby wrote: >> Silly question, but here goes... what's a good way to determine when a >> file is an Open Office document? I could look at the file extension, but >> it seems there would be a better way. VI shows this info in the files: >> >> mimetypeapplication/vnd.oasis.opendocument.textPK > > It's a ZIP archive.
Thanks, I used this approach: import zipfile if zipfile.is_zipfile(filename): ... Now, If only I could something like that on PDF files :) -- http://mail.python.org/mailman/listinfo/python-list