irritating problem

Peter Hansen peter at
Mon Sep 15 22:32:03 CEST 2003

Park997 wrote:
> I have a script that runs correctly in IDLE, runs correctly when invoked in the
> Command Prompt (Win XP), runs correctly from Komodo, but flashes a black box
> too fast to see when the icon is double clicked and produces no output. There
> are no error meassages from any of the methods that produce output. All of the
> other modules in the same directory (these are imported to the problem module)
> work correctly in any start mode.

Can you select Properties for that icon and change it so it doesn't close
the window automatically when the program terminates?

Or is this just using the default settings after you've installed Python,
in which case it's being run using the assocation for the .py file extension?
In that case, you should go to Explorer, under View->Folder Options.  Then
click the File Types tab, scroll down until you find the entry for the Python
files (make sure you use .py or .pyw as appropriate), then click on Edit,
then on Run in the Actions area, then on Edit.  You should then see, in about 
the 19th dialog that has popped up (isn't Windows wonderful?! Truly those at 
Microsoft are masters of good user interface design!), the actual command
that is being executed when you click on the icon.  I suspect it uses the
directory that the .py file is in as the current directory, and it should
show an absolute path to where it thinks Python should be, then something
like "%1" %* which roughly means execute the file using the exact command
plus the filename in quotation marks.  I suspect the %* does nothing in most

If you can then go to the DOS prompt in the same directory, and type the
same command, and everything works.... well then you've got a problem on
your hands, don't you?  ;-)  (But let us know more, then, as there are 
doubtless other steps to take.)


More information about the Python-list mailing list