Supernatural
The IPython Notebook environment offers much more than just the interactive execution of Python instructions. It can seamlessly integrate documents, programs, and tools with ease.
|
The IPython Notebook environment offers much more than just the interactive execution of Python instructions. It can seamlessly integrate documents, programs, and tools with ease.
Python has always offered an interactive mode. The IPython Notebook environment constitutes an extremely multi-faceted and updated extension [1]. Besides many useful tools like direct shell commands, improved help functions, and runtime measurement for program parts, IPython Notebook connects source text with graphics, wiki-like texts, and everything that HTML5 has to offer in one interactive document. Users working with Python should not ignore the advantages of using Notebook.
Entering python in the command line starts the so-called "Read-eval-print loop" (REPL) [2]. REPL delivers a result once a code line is entered. IPython, however, offers a much improved version of REPL. Although its origins are in the scientific community, many sys admins and developers should not do without IPython Notebook.
Using a shell has some disadvantages. In addition to the limitation of one entry per line, users struggle with the ephemeral nature of the input mechanism. The IPython Notebook does offer a command history that reaches across sessions so that, when restarting, the user can find all previously entered commands. Still, IPython Notebook is much more convenient because it saves all input. The output types can include text, HTML, images, and even GUI elements.
The ipython notebook command starts a new browser window when the IPython Notebook is installed (see the "Installation" box for details). You should select New and then Python 3 from the drop-down menu to open a new Notebook. Figure 1 shows the result.
Installation
The IPython Notebook works with Python2 and 3. There are several ways to install the software. If you use pip , then typing pip install "ipython[notebook]" will do the job.
If you would like to install other packages like NumPy or Pandas , then it is a good idea to use the Anaconda distribution. The guidelines for installation are described on the download site [5].
Of course, you can also use the package manager of your Linux distribution. Bear in mind though that your distribution will probably pack a significantly older version that may not support some of the features presented in this article.
The menus make for comfortable operation. The Kernel menu option indicates that Notebook is an active client, which is connected to a local server running on the machine. The software packages Tornado [3] and ZeroMQ [4] are at work in the background.
The first task is always to rename the file. Click on Untitled and then enter the name you have chosen in the window that opens. You will then find a <name>.ipynb file in the filesystem that contains all of the information about the Notebook in JSON format.
Pages: 4
Programmers and web designers need to manage a variety of information from one central point. The Leo editor steps up to the challenge in several clever ways.
Faulty unmounts can quickly lead to disaster with SD cards and USB sticks. Magic Rescue can get your data back.
After the introduction to Python in the previous issue, this article deals with object orientation. As a practical exercise, you'll be programming a simple graphical user interface.
Lack of direct access to advanced settings can make Ubuntu less customizable; we look at three tools that can help you tweak those settings.
© 2024 Linux New Media USA, LLC – Legal Notice