wxPython newbie problems

JB jb at yahoo.de
Sat Oct 19 14:52:20 CEST 2002


I should like to rewrite a small application that runs on 
PyQt/Linux to work on wxPython/WinNT (as Qt is not free on 
Windows).
I hav installed wxPython and get some principal difficulties 
at the start:
I open a text console and type in
> python wxtest.py
Then I get a window with some error messages but this window 
is closed again so I see only a flash and cannot read the 
error messages.
Can somebody help me?

Here is the text in wxtest.py, probably full of all kind of 
bugs:


from wxPython.wx import *

class InputW(wxSplitterWindow):
  def __init__(self,parent):
    
wxSplitterWindow.__init__(self,parent,-1,size=wxSize(300,100))
    self.input_window = 
wxTextCtrl(self,-1,size=wxSize(300,100),style=wxTE_MULTILINE)
    self.output_window = 
wxTextCtrl(self,-1,size=wxSize(300,100),style=wxTE_MULTILINE)
    
self.SplitHorizontally(self.input_window,self.output_window)
#***************************************************************************************
class MainWidget(wxSplitterWindow):
  def __init__(self,parent):
    
wxSplitterWindow.__init__(self,parent,-1,size=wxSize(400,600))
    self.text  = InputW(self)
#    self.sheet = MyCanvas(self)
    wx.SplitVertically(self.text,text)
#=========================================================================================

class MyApp(wxApp):
    def OnInit(self):
        frame = wxFrame(NULL, -1, 'Konstruktionsprogramm')
        self.widget = MainWidget(self)
        frame.Show(true)
        self.SetTopWindow(frame)
        return true

app = MyApp()
app.MainLoop()

But the most imprtant thing would be to lear how to read the 
error messages. (I also tried pyShell, but it does not seem 
to work at all: I cannot load files from within pyShell).

TIA,
-- 
J.... B....


-----------== Posted via Newsfeed.Com - Uncensored Usenet News ==----------
   http://www.newsfeed.com       The #1 Newsgroup Service in the World!
-----= Over 100,000 Newsgroups - Unlimited Fast Downloads - 19 Servers =-----



More information about the Python-list mailing list