#! shbang for pyc files?

Thorsten Kampe thorsten at thorstenkampe.de
Sat Jun 5 11:42:20 EDT 2004


* MarkV (2004-06-05 16:56 +0100)
> Is there a way to make it possible to execute a compiled python file
> (whatever.pyc) on a linux/unix system without requiring the user to type
> "python whatever.pyc"? In the case of a .py file, you can put "#!
> /usr/bin/python" at the top and chmod +x, and then you don't even need the
> .py extension to run it - just type "whatever" - but when you compile the
> file, it loses this ability!

zsh: alias -s pyc=python



More information about the Python-list mailing list