Pure Python equivalent of unix "file" command?
Will Maier
willmaier at ml1.net
Thu Jul 19 15:49:32 EDT 2007
On Thu, Jul 19, 2007 at 03:29:35PM -0400, W3 wrote:
> Just a quick one... Is there such a thing?
Debian et al ship Python bindings[0] for file(1)[1]. file works by
using a file (/etc/magic) with 'magic' numbers in it to figure out
the type of a file. Googling 'python magic' will turn up a few
interesting threads.
[0] http://packages.debian.org/unstable/python/python-magic
[1] http://www.darwinsys.com/file/
--
[Will Maier]-----------------[willmaier at ml1.net|http://www.lfod.us/]
More information about the Python-list
mailing list