[Pythonmac-SIG] Spotlight Importing without .py
Henning Hraban Ramm
hraban at fiee.net
Sun Jan 22 01:28:48 CET 2006
Am 2006-01-21 um 08:01 schrieb Nicholas Matsakis:
> * The saddest part of this story is that /usr/bin/file has been on
> Mac OS
> X since day one and understands perfectly well what a "a python script
> text executable" is. Yet, when the Finder encounters a file
> without an
> extension or HFS code rather than, say, looking at the file to see
> kind it is, it absolves all responsibility and forces you to find an
> application that might open it.
In this case, 'file' may be right. But I wouldn't trust it if you've
to handle a lot of file types.
For example, I wrote a script to watch an ISDN input folder to
correct file names, unpacking archives etc.
Mostly I could trust in extensions and/or Mac type/creator codes.
But if someone sent some files without extension where the type/
creator codes also got lost, I tried 'file'.
It's enough to reckognize text files, but it fails with most
Greetlings from Lake Constance!
http://www.cacert.org (I'm an assurer)
More information about the Pythonmac-SIG