[Python-bugs-list] [ python-Bugs-595537 ] pythonw has a console on Win98

noreply@sourceforge.net noreply@sourceforge.net
Mon, 19 Aug 2002 11:04:17 -0700


Bugs item #595537, was opened at 2002-08-15 14:34
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=595537&group_id=5470

Category: Windows
Group: Python 2.2.1
Status: Open
Resolution: Works For Me
Priority: 5
Submitted By: Paul Spencer (pgs)
Assigned to: Tim Peters (tim_one)
Summary: pythonw has a console on Win98

Initial Comment:
executing a script with pythonw (2.2.1) on win98
results in a console window being visible.  I reverted
my application to Python 2.1.1 and it works fine. 

pythonw works okay on WinXP with 2.2.1 though.

----------------------------------------------------------------------

>Comment By: Paul Spencer (pgs)
Date: 2002-08-19 18:04

Message:
Logged In: YES 
user_id=52126

This works as you suggest.  I have actually managed to get
this problem with 2.1.1 as well now.  I think that the
problem is with GTK when a g_message or g_warning is issued,
it causes the console to open.  The console doesn't actually
appear right away, only when it gets to the g_message or
g_warning.  Any output that would have appeared before that
is missing, but any output after it does appear ( I think). 

I'm using pygtk0.6.6 to write a GTK-based python app, but
there's lots of C code too.

I will look in glib and see if I can find out what it might
be trying to do ... the unfortunate side effect of this is
that I doubt I can get you a short example unless you are
set up with pygtk.  I could provide binaries though ... 

----------------------------------------------------------------------

Comment By: Tim Peters (tim_one)
Date: 2002-08-15 23:18

Message:
Logged In: YES 
user_id=31435

Please give a specific, short example.  For example, if I 
double-click on this file from Explorer under Win98, using 
2.2.1, it plays the sound but no console window opens:

C:\Python22>type example.pyw
import winsound
winsound.Beep(3000, 1000)

C:\Python22>

What happens when you try that?  If a console window does 
pop up, check the your .pyw file assocation -- you may have 
damaged it.  .pyw (Python File (no console))'s Open action 
should be associated to

C:\PYTHON22\pythonw.exe "%1" %*

or to wherever you installed Python 2.2.1.

    



----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=595537&group_id=5470