Features
Discover what makes IPython powerful
Smart Tab Completion
IPython's intelligent tab completion is powered by Jedi, providing context-aware suggestions for:
- Object attributes and methods
- Function parameters and arguments
- File and directory paths
- Module names and packages
In [1]: import numpy
In [2]: numpy.array.[press TAB]
append astype base byteswap ... Magic Commands
Built-in special commands for interactive computing:
%timeit- Time code execution%debug- Enter debugger on exception%run- Execute Python scripts%prun- Profile code performance%matplotlib- Enable matplotlib integration
In [1]: %timeit sum(range(1000))
14.2 µs ± 245 ns per loop (mean ± std. dev. of 7 runs, 100,000 loops each)
In [2]: %run my_script.py
Script executed successfully
In [3]: %matplotlib inline Object Introspection
Explore objects and code interactively:
?- Show object documentation??- Show source codehelp()- Access Python help system
In [1]: import numpy
In [2]: numpy.array?
Type: type
String form: <class 'numpy.ndarray'>
Docstring:
ndarray(shape, dtype=float, buffer=None, offset=0,
strides=None, order=None)
In [3]: numpy.array??
Source code for numpy.ndarray... Rich Display System
Display rich output including:
- HTML, Markdown, and LaTeX rendering
- PNG, JPEG, and SVG images
- Interactive plots and visualizations
- Data tables and formatted output
Rich History System
Powerful command history with:
- Persistent history across sessions
- Search and filter history
- Access previous input/output with
_and_ih - History persistence to SQLite database
In [1]: x = 10
In [2]: y = 20
In [3]: x + y
Out[3]: 30
In [4]: _
Out[4]: 30
In [5]: _ih
['x = 10', 'y = 20', 'x + y', '_', '_ih'] System Integration
Seamlessly integrate shell commands:
- Run shell commands with
! - Capture command output to variables
- Access environment variables
- Change directory with
%cd
In [1]: !ls
In [2]: files = !ls *.py
In [3]: len(files)
Out[3]: 42
In [4]: %cd /tmp Jupyter Kernel
IPython powers the Jupyter ecosystem:
- Backend for Jupyter Notebook
- Powers JupyterLab interactive environment
- Enables remote code execution
- Supports multiple programming languages through custom kernels