jelle,
i'm looking to get an interactive ipython session running in a GUI
Maya. maya has a customized stdin so that it does not have a write
method
import IPython
# Error: StandardInput instance has no attribute 'write'
# Traceback (most recent call last):
# File "<maya console>", line 1, in <module>
# File "/Applications/Autodesk/maya2008/Maya.app/Contents/
Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/
ipython-0.9.1-py2.5.egg/IPython/__init__.py", line 58, in <module>
# __import__(name,glob,loc,[])
# File "/Applications/Autodesk/maya2008/Maya.app/Contents/
Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/
ipython-0.9.1-py2.5.egg/IPython/ipstruct.py", line 22, in <module>
# from IPython.genutils import list2dict2
# File "/Applications/Autodesk/maya2008/Maya.app/Contents/
Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/
ipython-0.9.1-py2.5.egg/IPython/genutils.py", line 118, in <module>
# Term = IOTerm()
# File "/Applications/Autodesk/maya2008/Maya.app/Contents/
Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/
ipython-0.9.1-py2.5.egg/IPython/genutils.py", line 113, in __init__
# self.cin = IOStream(cin,sys.stdin)
# File "/Applications/Autodesk/maya2008/Maya.app/Contents/
Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/
ipython-0.9.1-py2.5.egg/IPython/genutils.py", line 81, in __init__
# self._swrite = stream.write
# AttributeError: StandardInput instance has no attribute 'write' #
i can run ipythonx from commandline just fine, but i'd really like to
get this running inside a maya gui.
the contents of ipythonx are:
import sys
from pkg_resources import load_entry_point
sys.exit(
load_entry_point('ipython==0.9.1', 'console_scripts', 'ipythonx')()
)
if i run the above code in maya i end up with the same error with stdin.
-chad
On Sep 16, 2008, at 2:28 PM, Jelle Feringa wrote:
>
>> is it technically feasible to connect an
>> interactive python terminal to the active python session inside of
>> maya?
>
> It is, and if you run "sudo easy_install -U ipython" you'll upgrade to
> ipython 0.91 and you'll be able to run ipythonx, ipython in a WX shell
>
> >
--~--~---------~--~----~------------~-------~--~----~
Yours,
Maya-Python Club Team.
-~----------~----~----~----~------~----~------~--~---