- Jupyter Tutorial
- Jupyter - Home
- IPython - Introduction
- IPython - Installation
- IPython - Getting Started
- Running & Editing Python Script
- IPython - History Command
- IPython - System Commands
- IPython - Command Line Options
- Dynamic Object Introspection
- IPython - IO Caching
- Setting IPython as Default Python Environment
- Importing Python Shell Code
- IPython - Embedding IPython
- IPython - Magic Commands
- Project Jupyter - Overview
- Jupyter Notebook - Introduction
- Working With Jupyter Online
- Installation and Getting Started
- Jupyter Notebook - Dashboard
- Jupyter Notebook - User Interface
- Jupyter Notebook - Types of Cells
- Jupyter Notebook - Editing
- Jupyter Notebook - Markdown Cells
- Cell Magic Functions
- Jupyter Notebook - Plotting
- Converting Notebooks
- Jupyter Notebook - IPyWidgets
- QtConsole - Getting Started
- QtConsole - Multiline Editing
- QtConsole - Inline Graphics
- QtConsole - Save to Html
- QtConsole - Multiple Consoles
- Connecting to Jupyter Notebook
- Using github and nbviewer
- JupyterLab - Overview
- Installation & Getting Started
- JupyterLab - Interface
- JupyterLab - Installing R Kernel
- Jupyter Resources
- Jupyter - Quick Guide
- Jupyter - Useful Resources
- Jupyter - Discussion
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
IPython - Getting Started
This chapter will explain how to get started with working on IPython.
Starting IPython from Command Prompt.
Before proceeding to understand about IPython in depth, note that instead of the regular >>>, you will notice two major Python prompts as explained below −
In appears before any input expression.
Out appears before the Output appears.
Besides, the numbers in the square brackets are incremented automatically. Observe the following screenshot for a better understanding −
Now, if you have installed Anaconda distribution of Python, open Anaconda prompt from start menu.
Start IPython from conda prompt
When compared to regular Python console, we can notice a difference. The IPython shell shows syntax highlighting by using different colour scheme for different elements like expression, function, variable etc.
Another useful enhancement is tab completion. We know that each object has one or more methods available as defined in its class. IPython pops up appropriate list of methods as you press tab key after dot in front of object.
In the following example, a string is defined. As a response, the methods of string class are shown.
IPython provides information of any object by putting ‘?’ in front of it. It includes docstring, function definitions and constructor details of class. For example to explore the string object var defined above, in the input prompt enter var?. The result will show all information about it. Observe the screenshot given below for a better understanding −
IPython’s in-built magic functions are extremely powerful. There are two types of magic functions.
- Line magics, which work very much like DOS commands.
- Cell magics, which work on multiple lines of code.
We shall learn about line magic functions and cell magic functions in detail in subsequent chapters.