If your project has a setup.py script and you're installing your python packages, scripts, and dependencies using setuptools (and you should be), you can use the entry_points feature of setuptools.
setup.py
from setuptools import setup
setup(
# other arguments here...
entry_points={
'console_scripts': [
'myScript = my_package.run:main',
],
},
)
Your project structure should look like this:
setup.py
/my_package
__init__.py
run.py
Your run.py script should have a main() function, which will get run when someone types myScript at the command line. This works regardless of what shell they use or what platform you're on.