1

Whenever I try to use the python interpreter on windows,

C:\path>pythonw.exe cubes.py
<blank line>
C:\path>

happens.

using python.exe instead works, but every tutorial tells me to use pythonw.exe.

Am I missing something?

itdoesntwork
  • 4,666
  • 3
  • 25
  • 38

1 Answers1

1

According to http://www.velocityreviews.com/forums/t752828-pythonw-exe.html, which I quickly verified myself:

pythonw.exe is the same as python.exe but it doesn't open a console window, and launches python in the background. This allows you to easily run background programs or GUI programs in a nicer way (without a dummy console window popping up).

This is precisely what you see. Don't use pythonw.exe if you want an interactive interpreter.

max
  • 49,282
  • 56
  • 208
  • 355
  • 2
    Not exactly the same, even for GUI apps: http://stackoverflow.com/questions/10114018/python-script-works-with-py-extension-but-not-with-pyw-extension/10114171#10114171 – agf Apr 12 '12 at 20:35
  • Wow... what can I say.. nothing is as simple as it seems. Again, I'd encourage you to put your comments into answers :) – max Apr 12 '12 at 21:05
  • Your answer is perfectly adequate to answer his question. I'd vote it up but I'm afraid I'd hit the serial upvoter limit since I looked through a bunch of your old posts in the last few days. – agf Apr 12 '12 at 21:07