[wxPython] SetUseBestVisual

On my Sgi I need this function to start wx in truecolor. In C++ I call it in
MyApp constructor, for example:

class MyApp : public wxApp
...

MyApp::MyApp()
{
     SetUseBestVisual(true);
}

I tried to do the same in python, but it seems not possible to run:

class MyApp(wxApp):
     def __init__(self):
          self.SetUseBestVisual(1)

     ...

This gives me an error. Then I decided to modify directly wx.py, this way:

class wxApp(wxPyApp):
     ...
     def __init__( self, ... ):
          wxPyApp.__init__(self)
          self.SetUseBestVisual(1)
          ...

This seems to work, but is there a more "orthodox" way do call the
SetUseBestVisual method?

Thanks,
Maurizio

I tried to do the same in python, but it seems not possible to run:

class MyApp(wxApp):
     def __init__(self):
          self.SetUseBestVisual(1)

     ...

This gives me an error. Then I decided to modify directly wx.py, this way:

You forgot to call the base class __init__

class MyApp(wxApp):
    def __init__(self):
        wxApp.__init__(self)
        self.SetUseBestVisual(1)

···

--
Robin Dunn
Software Craftsman
robin@AllDunn.com
http://wxpython.org Java give you jitters?
http://wxpros.com Relax with wxPython!