Get the name of current script with Python
<p>I'm trying to get the name of the Python script that is currently running.</p>

<p>For example, I have a script called <code>foo.py</code> and I would like to do something like this inside it:</p>

<pre><code>print Scriptname
</code></pre>

<p>and get: <code>foo.py</code>.</p>
