guess file type in python

M

mark

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,430
Messages
2,571,676
Members
48,796
Latest member
Greg L.

Latest Threads

Top