Package file-py25-5.07-1
| System | Binary Distributions | CVS/rsync Source Distributions | |
|---|---|---|---|
10.7/x86_64 | |||
10.6/x86_64 | |||
10.6/i386 | |||
10.5/i386 | |||
10.5/powerpc | 5.07-1 | ||
| Description: | Determine file type (magic) (5.07-1) | |
Python interface to file (magic).
Identifies a file's type based on the contents then provides a
description or a mime type.
File tests each argument in an attempt to classify it. There are
three sets of tests, performed in this order: filesystem tests,
magic number tests, and language tests. The first test that
succeeds causes the file type to be printed. | ||
| Usage Hints: | ||
Here is a quick usage of the library identifying a file type:
python
import magic
magicfile = magic.open(magic.MAGIC_NONE)
magicfile.load()
filetype = magicfile.file('somefile.xml')
print filetype | ||
| Section: | libs/pythonmods | |
| Maintainer: | Kurt Schwehr <goatbarATusersDOTsourceforgeDOTnet> | |
| Website: | http://www.darwinsys.com/file/ | |
| License: | BSD | |
| Info-File: | dists/10.4/stable/main/finkinfo/libs/pythonmods/file-py.info CVS log, Last Changed: Fri, 20 Jan 2012 22:24:08 (UTC) | |
Section list - Flat package list - Search packages
(*) = Unsupported distribution.