You use a shebang line at the start of your script:
#!/usr/bin/env python
make the file executable:
chmod +x arbitraryname
and put it in a directory on your PATH (can be a symlink):
cd ~/bin/
ln -s ~/some/path/to/myscript/arbitraryname
More Related Contents:
- Linux command-line call not returning what it should from os.system?
- ‘yes’ reporting error with subprocess communicate()
- How to make a python, command-line program autocomplete arbitrary things NOT interpreter
- Calling a python script from command line without typing “python” first
- Sub-process in Python execute two task? [closed]
- How to control the source IP address of a ZeroMQ packet on a machine with multiple IPs?
- How do I access command line arguments?
- Why does multiprocessing use only a single core after I import numpy?
- Run function from the command line
- Executing multi-line statements in the one-line command-line
- Shebang Notation: Python Scripts on Windows and Linux?
- python-dev installation error: ImportError: No module named apt_pkg
- Ensure a single instance of an application in Linux
- Force python to use an older version of module (than what I have installed now)
- Python multiprocessing: Permission denied
- Simulating Key Press event using Python for Linux
- How to store the result of an executed shell command in a variable in python? [duplicate]
- Return value of x = os.system(..) [duplicate]
- How do I ‘lock the keyboard’ to prevent any more keypresses being sent on X11/Linux/Gnome?
- gunicorn command not found, but it’s in my requirements.txt
- Fetching the output of a command executed through os.system() command [duplicate]
- Python [Errno 98] Address already in use
- Pyaudio installation error – ‘command ‘gcc’ failed with exit status 1′
- running a command line containing Pipes and displaying result to STDOUT
- how to find the owner of a file or directory in python
- On linux SUSE or RedHat, how do I load Python 2.7
- Could not find or load the Qt platform plugin “xcb”
- How can I set the matplotlib ‘backend’?
- Python – Trap all signals
- Ignore case in glob() on Linux