determining file type

Ritesh Raj Sarraf riteshsarraf at gmail.com
Wed Jun 14 05:22:15 EDT 2006


Hi,

I have a funtion named unzipper() which does the work of unzipping the
files.

Is there a way I can identify what is the type of the file which'll be
passed to unzipper().
If yes, I'll be able to make out if it's a zip file or a tar or a bz2
file.

Thanks,
Ritesh




More information about the Python-list mailing list