Difference between revisions of "Slicer3:Python:ipython"

From Slicer Wiki
Jump to: navigation, search
Line 1: Line 1:
Install ipython
+
==Install ipython==
  
 
<pre>
 
<pre>
Line 11: Line 11:
 
Just a note (inorton): I had a small issue with installation due to md5 import error during setup.py. It looks like stemming from different openssl versions on the Slicer build host machine (this was installing in 3.4 binary distribution for linux). Anyway, got around it by commenting out "import md5" in the offensive utility library:  ".../ipython-0.9.1/IPython/external/path.py" md5 is only used in one service routine -- which is not called anywhere else. So should not be a problem, and works fine so far.
 
Just a note (inorton): I had a small issue with installation due to md5 import error during setup.py. It looks like stemming from different openssl versions on the Slicer build host machine (this was installing in 3.4 binary distribution for linux). Anyway, got around it by commenting out "import md5" in the offensive utility library:  ".../ipython-0.9.1/IPython/external/path.py" md5 is only used in one service routine -- which is not called anywhere else. So should not be a problem, and works fine so far.
  
* Hints:
+
==Hints==
To use the %edit magic function with tk ipython:
+
* To use the %edit magic function with tk ipython:
 
  __IPYTHON__.rc.editor = 'xterm -e vi'
 
  __IPYTHON__.rc.editor = 'xterm -e vi'
 +
 +
* (as of October 16, 2009) Tab completion will match slicer MRML node ID and MRML node Names.  A dictionary Slicer.slicer.MRML (indexed by node Name) can be used to access nodes easily.

Revision as of 15:12, 16 October 2009

Home < Slicer3:Python:ipython

Install ipython

cd Slicer3-lib
wget http://ipython.scipy.org/dist/ipython-0.10.tar.gz
tar xvfz ipython-0.10.tar.gz
cd ipython-0.10
../../Slicer3-build/Slicer3 --launch ../python-build/bin/python setup.py install

Just a note (inorton): I had a small issue with installation due to md5 import error during setup.py. It looks like stemming from different openssl versions on the Slicer build host machine (this was installing in 3.4 binary distribution for linux). Anyway, got around it by commenting out "import md5" in the offensive utility library: ".../ipython-0.9.1/IPython/external/path.py" md5 is only used in one service routine -- which is not called anywhere else. So should not be a problem, and works fine so far.

Hints

  • To use the %edit magic function with tk ipython:
__IPYTHON__.rc.editor = 'xterm -e vi'
  • (as of October 16, 2009) Tab completion will match slicer MRML node ID and MRML node Names. A dictionary Slicer.slicer.MRML (indexed by node Name) can be used to access nodes easily.