wxPython output unsupported?

Discussion Forums discussion wxPython output unsupported?

This topic contains 0 voices and has 4 replies.

Viewing 5 posts - 1 through 5 (of 5 total)
Author Posts
Author Posts
February 25, 2006 at 10:35 pm #35

ztn
Member

Using a ‘tool’ to run wxPython fails unless “Capture Output” is de-selected.

If that check-box IS selected, then no output appears from print statements, and no windows appear either.

Is this a bug or what?

February 26, 2006 at 3:16 pm #14886

simon
Key Master

I haven’t tried this, as I haven’t used wxPython. However, python itself works fine so I’m not sure what output you’re expecting from wxPython?

If there’s something easy that I can try I’ll give it a go.

February 28, 2006 at 12:23 am #14887

ztn
Member

Here is the simplest wxPython code I could find, from the wxPython.org tutorial:

import wx

print “test”

app = wx.PySimpleApp()

frame = wx.Frame(None, -1, “Hello World”)

frame.Show(1)

app.MainLoop()

This will output the word “test” to standard out, and open a hello world window. Neither of these things happen when you setup a tool to run the script with “Capture Output” checked. You have to uncheck that feature for this code to run.

Let me know if you find anything out.

Thanks!

October 3, 2006 at 4:21 am #14888

normanlorrain
Member

I’ve had similar problems. Console Python programs work fine, but running wxpython creates a problem… The main window won’t appear, however modal dialogs do.

I think the problem might be in the tools.cpp file, line 1131 has

si.dwFlags = STARTF_USESHOWWINDOW | STARTF_USESTDHANDLES;

I think it should change to

si.dwFlags = STARTF_USESTDHANDLES;

I can’t compile the program, perhaps someone can test if this would be a fix.

October 4, 2006 at 8:55 am #14889

simon
Key Master

I’ll see if I can try this later on today, if it works ok and doesn’t affect other tools it’ll be in the next dev release.

Viewing 5 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic.