Has anyone tried to use the wxPython new feature to create custom GUIs??
I had installed python and wxpython as told in the User Guide. Then I created a hello world app, and I saved it in a folder that is in the sys.path variable, but it fails when I try to run it.
The Hello World app:
Code:
import wx
class Application(wx.Frame):
def __init__(self, parent):
wx.Frame.__init__(self, parent, -1, 'My GUI', size=(300, 200))
panel = wx.Panel(self)
sizer = wx.BoxSizer(wx.VERTICAL)
panel.SetSizer(sizer)
txt = wx.StaticText(panel, -1, 'Hello World!')
sizer.Add(txt, 0, wx.TOP|wx.LEFT, 20)
self.Centre()
self.Show(True)
app = wx.App(0)
Application(None)
app.MainLoop()
and then in the script editor:
Code:
from nukescripts import utils, pyWxAppUtils
MyApp = "help.py"
pyWxApp = pyWxAppUtils.pyWxAppHelper(MyApp, start = True)
... but Nuke does nothing.
I don't know what is going wrong.