Re: problems with tarfile.open and tar.bz2

2005-08-26 Thread justin . vanwinkle
r is supposed to autodetect the archive type. However, even changing it to 'r:bz2' produces an identical error. -- http://mail.python.org/mailman/listinfo/python-list

problems with tarfile.open and tar.bz2

2005-08-26 Thread justin . vanwinkle
Hello everyone, I need some tar functionality for my program. Currently the following code properly displays tar archives, and tar.gz archives. However, it chokes on tar.bz2 archives with the following error: File "mail_filter.py", line 262, in extract_archive tar_archive = tarfile.open('

Filetypes in email attachments.

2005-08-25 Thread justin . vanwinkle
Hello everyone, I'm writing a simple spam filter as a project, partly to learn python. I want to filter by filetype, however, the mime content type I get using .get_content_type gives limited and possibly bogus information, especially when trying to detect viruses or spam. I would like to use the