title: Run python program without 'python' in Windows
body: <p>I have written a simple python script, and I need to run it as an executable, i.e., without the 'python' word at the beginning of the program. The script (simple_prog.py) is :</p>
  
  <blockquote>
    <p>#!C:\Python27\python.exe</p>
    
    <p>print "Hello World"</p>
  </blockquote>
  
  <p>Whenever I am running the script as 'python simple_prog.py', it is printing the output alright, but without that, it is printing nothing (image below).</p>
  
  <p><a href="https://i.stack.imgur.com/sHypV.png" rel="noreferrer"><img src="https://i.stack.imgur.com/sHypV.png" alt="image"></a></p>
  
  <p>I have also referred to the "How do I make Python scripts executable?" section in the site <a href="https://docs.python.org/3/faq/windows.html#id3" rel="noreferrer">https://docs.python.org/3/faq/windows.html#id3</a>, from the stackoverflow question <a href="https://stackoverflow.com/questions/4235834/how-to-make-python-scripts-executable-on-windows">How to make python scripts executable on Windows?</a> , but could not understand the solution.</p>
  
  <p>Thanks.</p>
  
  <p>Update :</p>
  
  <p>Solved the problem from the stackoverflow link : <a href="https://stackoverflow.com/questions/11472843/set-up-python-on-windows-to-not-type-python-in-cmd">Set up Python on Windows to not type python in cmd</a></p>
  
  <p>This is what I followed (image below)</p>
  
  <p><a href="https://i.stack.imgur.com/D2hdU.png" rel="noreferrer"><img src="https://i.stack.imgur.com/D2hdU.png" alt="enter image description here"></a></p>
  
  <p>Please note the position of double-quotes in the ftype command.</p>
  
  <p>The second command (simple_prog) ran successfully because I updated the PATHEXT variable by adding ".PY" in it.</p>
  
  <p>Thanks for the responses as well as the downvotes.</p>