title: Python Command Line Argument sys.argv not working
body: <p>I'm having some trouble using sys.argv in order to be able to run the program from the command line. I am running IDLE 3.5. I have tried running the program below both through a command prompt and the Python(3.5) command line. On both I am receiving an error:</p>
  
  <p>in Python(3.5):</p>
  
  <pre><code>&gt;&gt;&gt; python testing.py
    File "&lt;stdin&gt;", line 1
      python testing.py
                   ^
  SyntaxError: invalid syntax
  &gt;&gt;&gt;
  </code></pre>
  
  <p>in Command Prompt:</p>
  
  <pre><code>C:\Users\Brice_000&gt;python testing.py
  python: can't open file 'testing.py': [Errno 2] No such file or directory
  </code></pre>
  
  <p>testing.py reads:</p>
  
  <pre><code>import sys
  
  def main():
      print sys.argv
  
  
  if __name__ == "__main__":
  main(sys.argv)
  </code></pre>
  
  <p>The tutorial I watched shows that this python file, when executed from the command line will return just the name of the program "testing.py"</p>
  
  <p>I have a suspicion that somehow there's an issue with the file directories and when the command line is trying to open the file, it isn't there.</p>
  
  <p>Does anyone know how I might go about figuring out what the issue is? And if so, how can I correct it?</p>
  
  <p>Sorry if my question here is poorly formed. I'm new to python and stackoverflow and I don't really know what I'm doing yet.</p>
  
  <p>Output of dir:</p>
  
  <pre><code>C:\Users\Brice_000&gt;dir
   Volume in drive C has no label.
   Volume Serial Number is 60E5-73E9
  
   Directory of C:\Users\Brice_000
  
  11/01/2015  04:45 PM    &lt;DIR&gt;          .
  11/01/2015  04:45 PM    &lt;DIR&gt;          ..
  11/01/2015  04:47 PM    &lt;DIR&gt;          .gimp-2.8
  11/01/2015  05:07 PM    &lt;DIR&gt;          .idlerc
  06/21/2015  09:20 PM    &lt;DIR&gt;          .jagex_cache_32
  08/23/2015  08:00 PM    &lt;DIR&gt;          .oracle_jre_usage
  01/11/2013  03:59 PM    &lt;DIR&gt;          .swt
  11/01/2015  04:45 PM    &lt;DIR&gt;          .thumbnails
  09/15/2015  10:12 PM    &lt;DIR&gt;          3D Objects
  10/14/2015  08:48 AM    &lt;DIR&gt;          Contacts
  08/29/2015  04:28 PM    &lt;DIR&gt;          Creative Cloud Files
  11/16/2015  05:08 PM    &lt;DIR&gt;          Desktop
  11/20/2015  11:32 PM    &lt;DIR&gt;          Documents
  11/24/2015  02:26 PM    &lt;DIR&gt;          Downloads
  04/08/2013  10:26 PM    &lt;DIR&gt;          Dropbox
  01/12/2013  01:16 PM    &lt;DIR&gt;          dumps
  10/14/2015  08:48 AM    &lt;DIR&gt;          Favorites
  06/21/2015  09:37 PM                23 jagexappletviewer.preferences
  02/26/2013  06:31 PM    &lt;DIR&gt;          jagexcache
  06/21/2015  09:21 PM    &lt;DIR&gt;          jagexcache1
  02/19/2013  07:45 PM                50 jagex_cl_loginapplet_LIVE.dat
  05/13/2014  10:34 PM                48 jagex_cl_oldschool_LIVE.dat
  06/21/2015  09:21 PM                48 jagex_cl_runescape_LIVE.dat
  06/21/2015  09:21 PM                49 jagex_cl_runescape_LIVE1.dat
  10/14/2015  08:48 AM    &lt;DIR&gt;          Links
  10/20/2015  05:30 AM    &lt;DIR&gt;          Music
  11/05/2015  12:42 AM    &lt;DIR&gt;          OneDrive
  10/28/2015  08:50 PM    &lt;DIR&gt;          Pictures
  06/22/2015  12:32 AM                24 random.dat
  10/14/2015  08:48 AM    &lt;DIR&gt;          Saved Games
  10/14/2015  08:48 AM    &lt;DIR&gt;          Searches
  08/04/2015  08:35 PM    &lt;DIR&gt;          SkyDrive
  02/25/2014  03:54 AM    &lt;DIR&gt;          SkyDrive (2).old
  04/07/2014  01:55 PM    &lt;DIR&gt;          SkyDrive (3).old
  02/16/2014  02:50 PM    &lt;DIR&gt;          SkyDrive.old
  03/12/2015  08:15 PM    &lt;DIR&gt;          Tracing
  10/14/2015  08:48 AM    &lt;DIR&gt;          Videos
                 6 File(s)            242 bytes
                31 Dir(s)  49,005,813,760 bytes free
  </code></pre>