take path of script as an argument python
<p>I have this python script which sits in </p>

<pre class="lang-none prettyprint-override"><code>/some/folder/foo.py
</code></pre>

<p>So if I am in <code>/some/folder</code> and do </p>

<pre><code>python foo.py
</code></pre>

<p>the script runs great. Now I want to take this path <code>/some/folder</code> as an argument, so that I can run this script when in different folder.</p>

<p>something like if I am in <code>/a/different/folder</code> and from this folder I want to execute </p>

<pre><code>foo.py
</code></pre>

<p>How do i do this?
Thanks</p>
