The Following 15 Users Say Thank You to rcolistete For This Useful Post: | ||
|
2014-05-06
, 05:04
|
Posts: 64 |
Thanked: 36 times |
Joined on Feb 2012
@ US
|
#2
|
|
2014-05-23
, 17:11
|
Posts: 1,269 |
Thanked: 3,961 times |
Joined on May 2011
@ Brazil
|
#3
|
|
2014-06-10
, 16:24
|
Posts: 245 |
Thanked: 233 times |
Joined on May 2010
@ Ljubljana, Slovenia
|
#4
|
The Following User Says Thank You to sponka For This Useful Post: | ||
|
2014-06-10
, 21:57
|
Posts: 1,269 |
Thanked: 3,961 times |
Joined on May 2011
@ Brazil
|
#5
|
The Following User Says Thank You to rcolistete For This Useful Post: | ||
|
2014-06-11
, 13:28
|
Posts: 1,269 |
Thanked: 3,961 times |
Joined on May 2011
@ Brazil
|
#6
|
|
2014-09-17
, 01:00
|
Posts: 1,269 |
Thanked: 3,961 times |
Joined on May 2011
@ Brazil
|
#7
|
|
2014-10-04
, 19:20
|
Posts: 1,269 |
Thanked: 3,961 times |
Joined on May 2011
@ Brazil
|
#8
|
|
2015-03-10
, 15:54
|
Posts: 337 |
Thanked: 891 times |
Joined on Jul 2012
@ Royaume Uni.
|
#10
|
IPython package is available for Saifish (& Mer & Nemo Mobile), so interactively using Python and its modules (like SymPy, NumPy, MatPlotLib, Uncertainties, etc) on Sailfish becomes a lot easier.
See the :
- "IPython for Maemo 4 & 5 & Meego Harmattan & Sailfish" topic in Talk Maemo.org for Maemo 4 Diablo and Maemo 5 Fremantle versions of IPython;
- "IPython (Notebook, QtConsole) 0.13.1 for MeeGo Harmattan" topic in Talk Maemo.org for MeeGo Harmattan versions of IPython.
IPython version history on Sailfish & Mer & Nemo Mobile :
- IPython 0.13.1 (21/10/2012) released for Mer & Nemo Mobile (25/02/2013), only with terminal interface;
- IPython 0.13.2 (05/04/2013) released for Mer & Nemo Mobile (01/06/2013), with terminal interface, Notebook web interface and Qt (for X11) console interface;
- IPython 1.2.1 (24/02/2014) released for Sailfish & Mer & Nemo Mobile (05/05/2014), with terminal interface and Notebook web interface;
- IPython 2.0.0 (01/04/2014) released for Sailfish & Mer & Nemo Mobile (05/05/2014), with terminal interface and Notebook web interface.
- IPython 2.1.0 (21/05/2014) a bug fix release, for Sailfish & Mer & Nemo Mobile (23/05/2014), with terminal interface and Notebook web interface.
- IPython 2.2.0 (06/08/2014) anoter bug fix release, for Sailfish & Mer & Nemo Mobile (16/09/2014), with terminal interface and Notebook web interface;
- IPython 2.3.0 (01/10/2014) is one more bug release, for Sailfish & Mer & Nemo Mobile (02/10/2014), with terminal interface and Notebook web interface.
- IPython 2.4.1 (09/02/2015) is the last 2.x release, for Sailfish & Mer & Nemo Mobile (07/08/2016), with terminal interface and Notebook web interface.
Screenshot of IPython 2.3.0 terminal interface Sailfish OS & Jolla :
Screenshot of IPython 2.0.0 Notebook web interface on Sailfish OS & Nexus 4 showing the dashboard with default web browser :
Screenshot of IPython 2.0.0 Notebook web interface on on Sailfish OS & Nexus 4 with default web browser, showing a MathJax example :
Screenshot of IPython 2.3.0 Notebook web interface on Sailfish OS & Jolla, with (Android) Firefox web browser, showing a SymPy example :
Screenshot of IPython 2.1.0 Notebook web interface using Webcat browser on Sailfish OS showing a SymPy plotting example :
Install Warehouse (OpenRepos.net client) for Sailfish OS, see the Jolla Tides guide with screenshots.
Then open Warehouse, search for "IPython", enable the repository, then install it.
Screenshot of Warehouse on Sailfish showing the IPython 2.3.0 package on OpenRepos.net :
IPython v2.4.1 for Sailfish OS depends on libZMQ, Python-PyZMQ, PycURL, Pygments, Tornado, Jinja2 and MarkupSafe, so they will be installed, everything taking 33 MB of space after installation.
If you want mathematical formulas rendered in IPython Notebook in offline mode, install MathJax following this guide in your Sailfish smartphone. It is recommended because the rendering of mathematical formulas is a lot faster with local installation.
"ipython nbconvert" doesn't work on Mer/Sailfish due to missing dependencies (pandoc, Haskell language, etc).
To use IPython terminal interface, type in Terminal :
$ ipython
If you have SymPy installed, see the topic "SymPy (Computer Algebra System) for Maemo 4 & 5 & MeeGo Harmattan & Sailfish", to load SymPy in interactive mode :
$ isympy
IPython Qt console doesn't work on Sailfish because it is not compatible with PyQt5 and Wayland.
To use IPython Notebook, type in Terminal :
$ ipython notebook
If "$BROWSER" variable has no content, it will show : So you can open a web browser and point it to "http://127.0.0.1:8888/".
Or you can configure the $BROWSER variable by choosing one web browser, using Terminal and typing "export BROWSER=<pathname-to-web-browser>". To make this configuration automatic for :
- Sailfish native web browser, type in Terminal :
$ echo 'export BROWSER=/usr/bin/sailfish-browser' >> ~/.bash_profile
- Webcat from Jolla Store, type :
$ echo 'export BROWSER=/usr/bin/harbour-webcat' >> ~/.bash_profile
- but the (Android) Firefox web browser doesn't open by setting the $BROWSER variable with :
export BROWSER='/usr/bin/apkd-launcher /data/app/org.mozilla.firefox-1.apk org.mozilla.firefox/org.mozilla.firefox.App'
It seens IPython Notebook doesn't like complex content in $BROWSER variable.
Then reboot your Jolla (or run in Terminal "source ~/.bash_profile") so this configuration will take effect.
My analysis of the web browsers for Sailfish :
- Sailfish web browser (default web browser) was very slow in Sailfish 1.x, but since last releases it is the best web browser to open and edit IPython Notebooks, rendering MathJax (mathematical symbols) very well, graphics, etc. Editing cells works, but to edit non-Code cells, just convert to Code cells, edit, then revert the type of the cell. With Bluetooth keyboard, almost all the keyboard shortcuts works;
- Firefox (Android version) (TO UPDATE);
- Chrome (Android version) (TO UPDATE).
IPython Notebook on Sailfish can also run as a server for remote web clients (PC's, Nokia N900, Nokia N9, Android devices, etc), see post #19 of the topic "IPython (Notebook, QtConsole) 0.13.1 for MeeGo Harmattan".
IPython documentation :
- online in the IPython.org site;
- examples in "/usr/share/doc/ipython-doc-2.4.1/examples/" after installing in Terminal :
$ pkcon install ipython-doc
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 interactive tutorial
IPython Interactive Reference
Sailfish OS also has last versions of SymPy (0.7.6.1), NumPy (1.9.1) and MatPlotLib (1.4.2), together with IPython terminal/Notebook they are a very powerful scientific suite for numerical, symbolical and graphical computations.
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; 2016-08-16 at 14:40. Reason: Updated to IPython 2.4.1