[IPython-dev] Standalone WX GUI support is broken (issue #645)

Piotr Zolnierczuk piotr.zolnierczuk at gmail.com
Wed Jan 11 15:55:20 EST 2012


Hi,

Not sure what to expect from the example (docs/examples/lib/gui-wx.py) but
here's what workes for me on a Windows machine (XP) and on RHEL 6 with EPD
7.2-1.

I got the pop-up and the buttons worked.

BTW: what does %gui wx do?

Piotr

$ git diff
diff --git a/docs/examples/lib/gui-wx.py b/docs/examples/lib/gui-wx.py
index c55ce4f..a374024 100755
--- a/docs/examples/lib/gui-wx.py
+++ b/docs/examples/lib/gui-wx.py
@@ -105,13 +105,19 @@ class MyApp(wx.App):


 if __name__ == '__main__':
-    raise NotImplementedError(
-        'Standalone WX GUI support is currently broken. '
-        'See https://github.com/ipython/ipython/issues/645 for details')
+    #raise NotImplementedError(
+    #    'Standalone WX GUI support is currently broken. '
+    #    'See https://github.com/ipython/ipython/issues/645 for details')

     app = wx.GetApp()
     if app is None:
         app = MyApp(redirect=False, clearSigInt=False)
+    else:
+        frame = MyFrame(None, "Simple wxPython App")
+        app.SetTopWindow(frame)
+        print "Print statements go to this stdout window by default."
+        frame.Show(True)
+

     try:
         from IPython.lib.inputhook import enable_wx





-- 

Piotr Adam Zolnierczuk
e-mail: piotr at zolnierczuk.net
www:   http://www.zolnierczuk.net
_____________________________________
written on recycled electrons
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20120111/642721d2/attachment.html>


More information about the IPython-dev mailing list