>>> import tarfile
>>> tarfile.is_tarfile("web2py.plugin.tagging.w2p")
True
>>> tarfile.is_tarfile("cookbook2.pdf")
False
>>> :)
File "<stdin>", line 1
:)
^
SyntaxError: invalid syntax
>>>
Now this needs to integrate with SQLFORM on_validation.
Should I also open the tar archive, and verify its contents are actually, python code, html, images (such as verifying each of them individually or just their filenames?)
-Thadeus