Unix-head needs to Windows-ize his Python script (II)

gb345 gb345 at invalid.com
Fri Oct 22 17:50:12 CEST 2010

In <mailman.128.1287758336.2218.python-list at python.org> Tim Golden <mail at timgolden.me.uk> writes:

>On 22/10/2010 15:25, gb345 wrote:
>> 3. Both versions of the app work fine on Windows 7, as long as
>> I do the following:
>>    a. run CMD
>>    b. cd to where the GUI script and my original script live
>>    c. execute either
>>       C:\Python27\python myapp_tk.py
>>       or
>>       C:\Python27\python myapp_wx.py

>The standard python.org associates .py & .pyw files with
>the installed interpreter. If you double-click on either
>of those files it should just run. If you were to rename
>the .py to a .pyw it would run without a console window
>showing up.

Thanks for the tip!  That would be great if I could get it to work.

When I click on the (renamed) myapp_tk.pyw or myapp_wx.pyw a console
appears and immediately disappears (it just flashes, really), too
quickly for me to see what it says.  (I imagine it's some error
message.) The renamed files still work fine if I run them as shown
above, though.

I see how clicking directly on these files would obviate the need
to specify the path of the interpreter, but it's still not clear
to me how the interpreter would know where to look for the myscript.py
module that both the GUI scripts require.


More information about the Python-list mailing list