[wx-Python-users] Simple In- and Output

Hi!

try:
app = MyApp(1,".\\logfile.txt")

it passes all statements to file logfile.txt (this is for windows)
if I remember correctly then:
0- all output to screen
1- all output to file
2-?? (forgot)

there is expalation in wxPython site, though I can't find it now.

···

On 11/16/05, Franz <franzlinux@gmx.de> wrote:

Hello,

I would like to do some input with the normal wx stdout/stderr if this
is possible.

import wx

class MyApp(wx.App):
        def OnInit(self):
                print "Hello World"
                test = input ("input: ")
                return True

app = MyApp(redirect=True)
app.MainLoop()

the code doesn't work. The program gets frozen, when I run it. What's
the command for 'input' in wx.Python ?

Regards,
Franz

---------------------------------------------------------------------
To unsubscribe, e-mail: wxPython-users-unsubscribe@lists.wxwidgets.org
For additional commands, e-mail: wxPython-users-help@lists.wxwidgets.org

try:
app = MyApp(1,".\\logfile.txt")

it passes all statements to file logfile.txt (this is for windows)
if I remember correctly then:
0- all output to screen
1- all output to file
2-?? (forgot)

I tried:
app = MyApp(0)

import wx

class MyApp(wx.App):
  def OnInit(self):
    print "Hello World"
    test = input ("input: ")
    print test
    return True

app = MyApp(0)
app.MainLoop()

then I can give input in the windows-command-line.
But when I change it to
app = MyApp()

it fails with the stdout of wx-python. Is it possible to give input in the stdout, too?

regards,
franz