OS : Ubuntu 12.1, python : 2.7.3, wx : 2.8 gtk2
#!/usr/bin/env python
#-*- coding:utf-8 -*-
import wx
import sys
class Frame (wx.Frame):
def __init__(self, parent, id, title):
print "Frame Initialised"
wx.Frame.__init__(self, parent, id, title)
class App (wx.App):
def __init__ (self, redirect=True, filename=None):
print "Application Initialised"
wx.App.__init__(self, redirect, filename)
def OnInit (self):
print "This is Application"
self.frame = Frame (parent=None, id=-1, title="Startup")
self.frame.show ()
self.SetTopWindow (self.frame)
print >> sys.stderr, "A fake error message"
return True
def OnExit (self):
print "Application Exiting"
if __name__ == '__main__':
app = App (redirect=True)
print "Things Before"
app.MainLoop ()
print "Things After"
Error:
(python:3805): Gtk-WARNING **: Unable to locate theme engine in module_path: "pixmap"
This error repeats 3 times and doesn't give the output. Is there anything wrong in the script? Thankyou for the help.
I fixed the warning by installing pixbuf:
sudo apt-get install gtk2-engines-pixbuf
Now there's a new problem; the frame just flashes and disappears quickly. I can't read any of those redirected messages!