FAQ
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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20091023/1adfb96f/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Shot18.jpg
Type: image/jpeg
Size: 14932 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/python-list/attachments/20091023/1adfb96f/attachment.jpg>

Search Discussions

  • Christian Heimes at Oct 23, 2009 at 8:49 am

    Martin Shaw wrote:
    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?
    Windows GUI programs don't have any standard streams. stdin, stdout and
    stderr aren't attached so any print statement or traceback isn't shown.
    Could this explain the behavior?

    Christian
  • Dave Angel at Oct 23, 2009 at 11:37 am

    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

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouppython-list @
categoriespython
postedOct 23, '09 at 8:26a
activeOct 23, '09 at 11:37a
posts3
users3
websitepython.org

People

Translate

site design / logo © 2022 Grokbase