Is it possible to run Python egg files directly as you can run jar files with Java?
For example, with Java you might dos something like:
As of Python 2.6, you can use python some.egg
and it will be executed if it includes a module named __main__
.
For earlier versions of Python, you can use PYTHONPATH=some.egg python -m some module
, and somemodule
from the egg will be run as the main module. (Note: if you're on Windows, you'd need to do a separate SET PYTHONPATH=some.egg
.)