View Single Post
Posts: 1,269 | Thanked: 3,961 times | Joined on May 2011 @ Brazil
#1
IPython is an enhanced Python interactive shell, so interactively using Python and its modules becomes a lot easier.

Versions of IPython :
- for Maemo 4 Diablo and Maemo 5 Fremantle : v0.10.2 is available in their repositories, this is the latest version compatible with Python 2.5 (so Maemo 4 & 5 can't have IPython >= 0.11);
- for MeeGo 1.2 Harmattan : v0.13.1 (with Notebook & Qt console) & v0.10.2 are available in my Harmattan repository, v0.10 in official Nokia repositories, see the IPython for MeeGo Harmattan topic in Talk Maemo.org;
- for Sailfish & Mer & Nemo Mobile : v2.2.0 (with Notebook) is available in OpenRepos.net, see the IPython (terminal, Notebook) for Sailfish topic in Talk Maemo.org.

IPython 0.10.2 x previous versions of IPython on Maemo 4 & 5 :
- v0.10.2 is newer (09/04/2011) than v0.10 (04/07/2009) for Maemo 5 and v0.8.1 (09/05/2007) for Maemo 4;
- v0.10.2 is the last IPython version compatible with Python 2.5.x present on Maemo 4 & 5;
- v0.10.2 is optified for Maemo 5, with a separate package 'ipython-doc' with documentation and examples;
- v0.10.2 has an icon for Maemo 4 and can be installed from the application manager;
- v0.10.2 for Maemo 5 is promoted to extras repository, so IPython is more visible to Maemo users and other packages (e.g., "SymPy Interactive Shell") depending on it can be promoted.

Screenshot on Nokia N900 after launching IPython by tapping the icon or typing "ipython" in X Terminal :


Install & use on Maemo 5 :
Click the install icon in Maemo.org Downloads or enable extras repository, search for IPython in the application manager and install "IPython". IPython takes about 6.3 MB after install but it is optified. Use the IPython icon or the terminal command 'ipython' to launch IPython (between 2-3 seconds).
See post #6 about using a Nokia N900 as web client for IPython 0.13.1 Notebook server running on a Nokia N9.

Install & use on Maemo 4 :
Click the install icon in Maemo.org Downloads or enable extras repository, search for IPython in the application manager and install "IPython". IPython takes about 6.3 MB after install. Use the IPython icon or the terminal command 'ipython' to launch IPython (about 7 seconds).
PS: the "help() not available - check site.py" warning in 1st line of the IPython windows seems to be due to some missing interactive "help" command of Python for Maemo 4.

The IPython v0.10.2 documentation and examples can also installed by typing '# apt-get install ipython-doc' as root with extras-testing or extras-devel repository enabled. It is optified and uses 13 MB after install. The files are located at the '/usr/lib/python2.5/site-packages/IPython-doc/' directory.

Some features of the IPython interactive shell :
- tab (or ctrl+i) completion for objects;
- input history navigation using up (or Ctrl+p) and down (or Ctrl+n) arrows;
- search input history by typing partial input then up/down arrow to show matching lines, or ctrl+r to have a serch prompt;
- input line n can be retrieved using '_in', 'In[n]', '_ih[n]', and _i, _ii, _iii to access the previous, next previous and next-next previous inputs;
- output line n can be retrieved using '_n', 'Out[n]', '_oh[n]', and _, __, ___ access the previous, next previous and next-next previous outputs;
- information about objects using '?word' or 'word?', full information with '??word' or 'word??';
- magic command system, like '%run file.py', '%pwd';
- run system commands with '!' as prefix, e.g., '!ls".
More details in :
IPython v0.10.2 interactive tutorial
IPython v0.10.2 Interactive Reference

IPython is the best interactive Python shell for using :
- SymPy (available on Maemo 4, 5, MeeGo Harmattan and Sailfish), and "SymPy Interactive Shell" (not yet for Sailfish) automatically installs IPython;
- NumPy & MatPlotLib (available on Maemo 5 and MeeGo 1.2 Harmattan), with "from pylab import *" loading NumPy and MatPlotLib;
- etc.

To Nokia N900 users, please help promote IPython and IPython Documentation to extras repository by voting in :
IPython 0.10.2-1maemo1
IPython documentation and examples 0.10.2-2maemo2
__________________
Python, C/C++, Qt and CAS developer. For Maemo/MeeGo/Sailfish :
Integral, Derivative, Limit - calculating mathematical integrals, derivatives and limits. SymPy - Computer Algebra System.
MatPlotLib - 2D & 3D plots in Python. IPython - Python interactive shell.
-- My blog about mobile & scientific computing ---
Sailfish : Sony Xperia X, Gemini, Jolla, Jolla C, Jolla Tablet, Nexus 4. Nokia N9, N900, N810.

Last edited by rcolistete; 2014-09-17 at 01:05. Reason: IPython 2.2.0 for Sailfish
 

The Following 16 Users Say Thank You to rcolistete For This Useful Post: