Skip to content Skip to sidebar Skip to footer

Running A Python Package

Running Python 2.6.1 on OSX, will deploy to CentOS. Would like to have a package to be invoked from a command line like this: python [-m] tst For that, here is the directory struc

Solution 1:

The feature to run the __main__ module of a package when using the command line -m option was introduced in Python 2.7. For 2.6 you need to specify the package module name to run; -m test.__main__ should work. See the documentation here.


Post a Comment for "Running A Python Package"