Chapter 7. User Interaction
Libraries in this chapter help developers write code that interacts with end users. We describe the Jupyter projectâitâs uniqueâthen cover the more typical command-line and graphical user interfaces (GUIs), and finish with a discussion of tools for web applications.
Jupyter Notebooks
Jupyter is a web application that allows you to display and execute Python interactively. Itâs listed here because itâs a user-to-user interface.
Users view Jupyterâs client interfaceâwritten in CSS, HTML, and JavaScriptâin a web browser on the client machine. The client communicates with a a kernel written in Python (or a number of other languages) that executes blocks of code and responds with the result. Content is stored on the server machine in ânotebookâ (*.nb) formatâtext-only JSON divided into a series of âcellsâ that can contain HTML, Markdown (a human-readable markup language like whatâs used on wiki pages), raw notes, or executable code. The server can be local (on the userâs own laptop), or remote like the sample notebooks at https://try.jupyter.org/.
The Jupyter server requires at least Python 3.3 and has been made compatible with Python 2.7. It comes bundled with the most recent versions of commercial Python redistributions (described in âCommercial Python Redistributionsâ) such as Canopy and Anaconda, so no further installation is required with these tools, provided you can compile and build C code on your system, as we ...
Get The Hitchhiker's Guide to Python now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.