[python-win32] clicking pyw file gives me a console

Tim Golden mail at timgolden.me.uk
Wed Jan 8 18:21:22 CET 2014


On 08/01/2014 17:04, Mark Lawrence wrote:
> On 08/01/2014 15:16, Tim Golden wrote:
>> On 06/01/2014 16:59, Mark Lawrence wrote:
>>> As the subject :(  It only happens if I've a shebang line at the top of
>>> the file, remove that and the file is launched without the console.  If
>>> I add a w to the end of python on the shebang line I get a dialog box
>>> "Python launcher is sorry to say ...  Invalid version specification:
>>> 'w'"  I've 2.7, 3.3 and now the latest version of 3.4 installed on
>>> Windows 7.  How do I go about debugging this?  Section 3.4.1.3. of the
>>> "Using Python on Windows" docs simply state "The launcher should have
>>> been associated with Python files (i.e. .py, .pyw, .pyc, .pyo files)
>>> when it was installed".
>>>
>>> Below are the file types and associations which look fine to me.
>>>
>>> Python.CompiledFile="C:\Windows\py.exe" "%1" %*
>>> Python.File="C:\Windows\py.exe" "%1" %*
>>> Python.NoConFile="C:\Windows\pyw.exe" "%1" %*
>>>
>>> .py=Python.File
>>> .pyc=Python.CompiledFile
>>> .pyo=Python.CompiledFile
>>> .pyw=Python.NoConFile
>>
>> Mark -- does this happen only if you double-click or also if you run the
>> file from the command line? By that I mean somthing like:
>>
>> c:\users\tim> myfile.py
>>
>> I ask because the Shell/Explorer (the program handling the double-click)
>> has its own association mechanism. Usually it matches the settings you
>> list above, but it doesn't have to.
>>
>>
>> TJG
>
> Just tried again and working perfectly, please don't ask.  Thinking
> about it I have been un- and re-installing 2.7, 3.3 and 3.4 so could
> well have caused some kind of problem there.  Sorry about the noise :(
>

Ok, thanks for letting us know; chalk it up to "one of those things"

:)

TJG


More information about the python-win32 mailing list