Take the 2-minute tour ×
Stack Overflow is a question and answer site for professional and enthusiast programmers. It's 100% free, no registration required.

I have extended the file context menu in the Windows registry and added a shortcut to a Python script (which is a Tkinter window). It runs fine, but obviously with the Python console in the background. I tried to change the shell command from python to pythonw (and renaming the file to .pyw) but then Windows always simply opens the "open with..." dialog and not the script. If I copy-paste the shell command and run it from cmd, it works. Running the .pyw from the explorer also works fine, without console.

Why is the behavior different when running it in the shell command?

This is in my .reg setup file under the command key:

@="pythonw \"C:\\test_script.pyw\" \"%1\""
share|improve this question

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.