title: sys.argv[0] always returns nothing
body: <p>I was trying to use sys.argv[0] to get the name of the script but it returned nothing. I guess that was because no script name was passed to the Python interpreter but I had no idea how to fix it.</p>
  
  <p>my code:</p>
  
  <pre><code>import sys
  print ("This is the name of the script: ", sys.argv[0])
  sys.argv[0]
  </code></pre>
  
  <p>outputs:</p>
  
  <pre><code>&gt;&gt;&gt; import sys
  &gt;&gt;&gt; print ("This is the name of the script: ", sys.argv[0])
  This is the name of the script:
  &gt;&gt;&gt; sys.argv[0]
  ''
  </code></pre>
  
  <p>Thank you</p>