Running JuPyther notebook with connected qt console and styles
Posted on Tue 12 January 2016 in Notes
When developing a project in JuPyther/Ipython notebook it is often nice to run some test code in a console, especially if you want to check the content of a variable that might have thousands of items – something that might choke your notebook.
Open your notebook as you'd normally do via a terminal:
$ ipython notebook
In a new terminal window, open a connected qtconsole:
$ ipython qtconsole --existing
Since the default color scheme isn't very nice, I usually choose a style, such as monokai
$ ipython qtconsole --existing --style=monokai
By doing this, you can share code between the notebook and the console, as well as draw graphs in both. This is nice for checking the result of a line of code or running a script that prints thousands of lines.
For a list of styles, run the following code in python:
In : from pygments.styles import STYLE_MAP In : print (STYLE_MAP.keys()) Out : dict_keys(['rrt', 'perldoc', 'monokai', 'friendly', 'borland', 'native', 'xcode', 'colorful', 'fruity', 'manni', 'paraiso-light', 'vs', 'emacs', 'bw', 'default', 'murphy', 'igor', 'paraiso-dark', 'trac', 'tango', 'pastie', 'vim', 'autumn'])