title: Python script doesn't work with double click
body: <p>I have a very basic problem, but I cannot find a solution in older answers.
  When I double click on a python script, I can see a prompt flashing but nothing happens. If I open the same script with IDLE and run it, everything works fine.
  To be sure the script was not executing propoerly, I made a test script like this:</p>
  
  <pre><code>def main():
     files = open('test.txt','a')
     files.write('this is a test')
  </code></pre>
  
  <p>The simple script write the file if launched thru idle, but nothing happens if if I double click it.
  I tried with both .py and pyw extension and in more than one (windows) pc. I added the python folder to the path with no avail.</p>
  
  <p>Thank you!</p>