I've just started to experiment with using iPython (http://ipython.scipy.org/moin/) and wondered how it could be integrated into SPE (http://pythonide.stani.be/). I found a few threads about it, but no solutions, so I started digging around in Stani's code and came up with the following solution for starters. This doesn't (yet) offer any other functionality from SPE, such as importing a script into the iPython shell or drag-and-drop of files onto the panel for execution, but it should add an extra panel to SPE containing an iPython shell. I'm working under Windows Vista with Python 2.6 and wxPython 2.8, using ipython-0.10. Hope this might help someone else.
Best regards,
Timothy Grove
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# IP_Shell.py - version 0.1.0
from IPython.gui.wx.ipython_view import IPShellWidget
class Panel(IPShellWidget):
"""
A simple class to add an iPython panel to SPE.
To use:
1. Create a file with this code, named 'IP_Shell.py', and add it to \_spe\tabs\.
2. Duplicate 'shell.png' in \_spe\skins\default\ and rename it to 'ip_shell.png' .
3. Edit 'Parent.py' in \_spe\. Change 'TABS = ['Shell','Locals', ...]' (line 44 in my editor) to
'TABS = ['Shell','IP_Shell','Locals', ...]'.
"""
def __init__(self,panel):
IPShellWidget.__init__(self, panel)
Thanks, with which version of IPython did you try this?
···
On Tue, Oct 27, 2009 at 10:38 AM, Timothy W. Grove <tim_grove@sil.org> wrote:
I've just started to experiment with using iPython
(http://ipython.scipy.org/moin/) and wondered how it could be integrated
into SPE (http://pythonide.stani.be/). I found a few threads about it,
but no solutions, so I started digging around in Stani's code and came
up with the following solution for starters. This doesn't (yet) offer
any other functionality from SPE, such as importing a script into the
iPython shell or drag-and-drop of files onto the panel for execution,
but it should add an extra panel to SPE containing an iPython shell. I'm
working under Windows Vista with Python 2.6 and wxPython 2.8, using
ipython-0.10. Hope this might help someone else.
Best regards,
Timothy Grove
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# IP_Shell.py - version 0.1.0
from IPython.gui.wx.ipython_view import IPShellWidget
class Panel(IPShellWidget):
"""
A simple class to add an iPython panel to SPE.
To use:
1. Create a file with this code, named 'IP_Shell.py', and add it to
\_spe\tabs\.
2. Duplicate 'shell.png' in \_spe\skins\default\ and rename it to
'ip_shell.png' .
3. Edit 'Parent.py' in \_spe\. Change 'TABS = ['Shell','Locals',
...]' (line 44 in my editor) to
'TABS =
['Shell','IP_Shell','Locals', ...]'.
"""
def __init__(self,panel):
IPShellWidget.__init__(self, panel)
>
--
Phatch Photo Batch Processor - http://photobatch.stani.be
SPE Python IDE - http://pythonide.stani.be
I used "easy_install -U ipython", which installed "ipython-0.10-py2.6.egg".
Stani wrote:
···
Thanks, with which version of IPython did you try this?
On Tue, Oct 27, 2009 at 10:38 AM, Timothy W. Grove <tim_grove@sil.org> wrote:
I've just started to experiment with using iPython
(http://ipython.scipy.org/moin/) and wondered how it could be integrated
into SPE (http://pythonide.stani.be/). I found a few threads about it,
but no solutions, so I started digging around in Stani's code and came
up with the following solution for starters. This doesn't (yet) offer
any other functionality from SPE, such as importing a script into the
iPython shell or drag-and-drop of files onto the panel for execution,
but it should add an extra panel to SPE containing an iPython shell. I'm
working under Windows Vista with Python 2.6 and wxPython 2.8, using
ipython-0.10. Hope this might help someone else.
Best regards,
Timothy Grove
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# IP_Shell.py - version 0.1.0
from IPython.gui.wx.ipython_view import IPShellWidget
class Panel(IPShellWidget):
"""
A simple class to add an iPython panel to SPE.
To use:
1. Create a file with this code, named 'IP_Shell.py', and add it to
\_spe\tabs\.
2. Duplicate 'shell.png' in \_spe\skins\default\ and rename it to
'ip_shell.png' .
3. Edit 'Parent.py' in \_spe\. Change 'TABS = ['Shell','Locals',
...]' (line 44 in my editor) to
'TABS =
['Shell','IP_Shell','Locals', ...]'.
"""
def __init__(self,panel):
IPShellWidget.__init__(self, panel)