471,056 Members | 1,648 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,056 software developers and data experts.

guess file type in python

Is there any way to guess the file type using python?
thanks
mark

For example in unix:

file code.py
code.py: a python script text executable

file Eccentric.gif
Eccentric.gif: GIF image data, version 89a, 237 x 277
Feb 22 '07 #1
0 1106

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

5 posts views Thread by Petri Savolainen | last post: by
17 posts views Thread by Sean Ross | last post: by
4 posts views Thread by Guilherme Salgado | last post: by
8 posts views Thread by EAS | last post: by
4 posts views Thread by Lonnie Princehouse | last post: by
7 posts views Thread by Doug Helm | last post: by
2 posts views Thread by Kenneth McDonald | last post: by
2 posts views Thread by enquiring mind | last post: by
4 posts views Thread by =?utf-8?B?Qm9yaXMgRHXFoWVr?= | last post: by
reply views Thread by leo001 | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.