problem with pythonw.exe
Dave Angel
davea at ieee.org
Fri Oct 23 07:37:32 EDT 2009
Martin Shaw wrote:
> Hi,
>
> I have a tkinter application running on my windows xp work machine and I am
> attempting to stop the console from appearing when the application runs.
> I've researched around and the way to do this appears to be to use
> pythonw.exe instead of python.exe. However when I try to run pythonw.exe
> from the command prompt it simply does nothing. I can't find anything like
> this where I've searched. I've tried reinstalling python. Pythonw.exe
> appears to work when i run it through cygwin however I don't really want to
> use cygwin for this application. Any idea as to what might be the problem?
>
> Thanks in advance,
>
> Martin
>
>
>
> ------------------------------------------------------------------------
>
Exactly what program is pythonw executing? You need to search your PATH
to see what's on it. For example, if your PATH has a c:\bat directory
on it, and in that directory you have a one-line batch file:
@c:\python26\pythonw.exe
then you're seeing the expected behavior. You'd need to add a parameter
to the batch file, probably %*
Or you could be pointing at some other executable.
The other possibility for you is to use the .pyw file association that
your install probably set up for you. Rename your main script to have a
.pyw extension, and then just type it as your command. To check file
associations, use assoc and ftype utilities, both standard on Windows XP
and Vista.
DaveA
More information about the Python-list
mailing list