Note
This documentation is for a development version of IPython. There may be significant differences from the latest stable release (1.2.1).
Classes for handling input/output prompts.
Authors:
Bases: object
This is used for formatting strings with values that need to be updated at that time, such as the current time or working directory.
Bases: string.Formatter
A Formatter that falls back on a shell’s user_ns and __builtins__ for name resolution
Bases: IPython.config.configurable.Configurable
This is the primary interface for producing IPython’s prompts.
Render the selected prompt.
Parameters: | name : str
color : bool
just : bool
**kwargs :
|
---|---|
Returns: | A string containing the rendered prompt. |
This is called when a prompt template is updated. It processes abbreviations used in the prompt template (like #) and calculates how many invisible characters (ANSI colour escapes) the resulting prompt contains.
It is also called for each prompt on changing the colour scheme. In both cases, traitlets should take care of calling this automatically.
Replace in ‘text’ all occurences of any key in the given dictionary by its corresponding value. Returns the new string.
Return the last depth elements of the current working directory.
$HOME is always replaced with ‘~’. If depth==0, the full path is returned.
Return the last depth elements of the current working directory.
$HOME is always replaced with ‘~’. If depth==0, the full path is returned.