Example #1
0
    def __init__(self, parent):
        # super makes the same as wx.Panel.__init__(self, parent, etc..)
        # but prepares for Python 3.0 among other things...
        super(MyPanel, self).__init__(parent, -1, \
            style = wx.BORDER_NONE | wx.MAXIMIZE)

        # ipython_shell is the shell object
        # WxController provides a Wx frontend for the IPython interpreter
        # see in /usr/lib/pymodules/python2.5/IPython/frontend/wx
        # see an example in /usr/lib/modules/python2.5/IPython/gui/wx
        ipython_shell = WxController(self)
        # ipython_shell = IPShellWidget(self,background_color = "BLACK")
        # ipython_shell = IPShellWidget(self)
        ipython_shell.clear_screen()

        # the ip object  will access the IPython functionality
        ip = IPython.ipapi.get()

        # Stimfit and NumPy are visible to the interactive sesion.
        # see embedded_init for details
        ip.ex('from embedded_init import *')

        sizer = wx.BoxSizer(wx.VERTICAL)
        sizer.Add(ipython_shell, 1, wx.EXPAND | wx.BOTTOM | wx.LEFT | wx.RIGHT,
                  10)
        self.SetSizer(sizer)
Example #2
0
    def __init__(self, *args, **kwargs):
        WxController.__init__(self, *args, **kwargs)

        # Add a magic to clear the screen
        def cls(args):
            self.ClearAll()
        self.ipython0.magic_cls = cls
    def __init__(self, parent):
        # super makes the same as wx.Panel.__init__(self, parent, etc..)
        # but prepares for Python 3.0 among other things...
        super(MyPanel, self).__init__(parent, -1, \
            style = wx.BORDER_NONE | wx.MAXIMIZE)

        # ipython_shell is the shell object
        # WxController provides a Wx frontend for the IPython interpreter
        # see in /usr/lib/pymodules/python2.5/IPython/frontend/wx
        # see an example in /usr/lib/modules/python2.5/IPython/gui/wx
        ipython_shell = WxController(self)
        # ipython_shell = IPShellWidget(self,background_color = "BLACK")
        # ipython_shell = IPShellWidget(self)
        ipython_shell.clear_screen()

        # the ip object  will access the IPython functionality
        ip =  IPython.ipapi.get()

        # Stimfit and NumPy are visible to the interactive sesion.
        # see embedded_init for details
        ip.ex('from embedded_init import *')

        sizer = wx.BoxSizer(wx.VERTICAL)
        sizer.Add(ipython_shell, 1, wx.EXPAND | wx.BOTTOM | wx.LEFT | wx.RIGHT, 10)
        self.SetSizer(sizer)
Example #4
0
    def __init__(self, *args, **kwargs):
        WxController.__init__(self, *args, **kwargs)

        # Add a magic to clear the screen
        def cls(args):
            self.ClearAll()

        self.ipython0.magic_cls = cls