 <p>Your program <code>runWithParameter.py</code> needs <code>#!/usr/bin/env python</code> at the top of it. Then, in your shell, type <code>chmod +x runWithParameter.py</code>. From there, you can simply type <code>runWithParameter.py</code> and it will run.</p> <p><strong>Example</strong>:</p> <p><code>foo.py</code>:</p> <pre><code>#!/usr/bin/env python print 'Hello World' </code></pre> <p>And depending on your <code>$PATH</code>, you can type <code>foo.py</code> to run it. Else, you will have to precede it with <code>./</code></p> <pre><code>bash-3.2$ chmod +x foo.py bash-3.2$ ./foo.py Hello World bash-3.2$ </code></pre> <p>Or, if you are going to be running this function locally, you can define a function:</p> <pre><code>bash-3.2$ function foo.py(){ &gt; ./foo.py &gt; } bash-3.2$ foo.py Hello World bash-3.2$ </code></pre>