On 28 February 2012 23:19, Amit Sethi <amit.pureene...@gmail.com> wrote: > Hi All , I am trying to read some file attachments being sent from > blackberrys . However blackberry compresses the document into base64 . Now > I am able to get the document by converting it back. However I wish to know > the file extension of the original document. Now I know file command reads > the document's header to find the file type . Is there some way of applying > the same concept with python . I do not wish to use subprocess.
If you are on a Linux/Unix system you can use python-magic. Regards, Gora _______________________________________________ BangPypers mailing list BangPypers@python.org http://mail.python.org/mailman/listinfo/bangpypers