##// END OF EJS Templates
IPython/Extensions/ipipe.py: xrepr(), xiter() and xattrs() are now...
IPython/Extensions/ipipe.py: xrepr(), xiter() and xattrs() are now generic functions (using Philip J. Eby's simplegeneric package). This makes it possible to customize the display of third-party classes without having to monkeypatch them. xiter() no longer supports a mode argument and the XMode class has been removed. The same functionality can be implemented via IterAttributeDescriptor and IterMethodDescriptor. One consequence of the switch to generic functions is that xrepr() and xattrs() implementation must define the default value for the mode argument themselves and xattrs() implementations must return real descriptors. IPython/external: This new subpackage will contain all third-party packages that are bundled with IPython. (The first one is simplegeneric). IPython/Extensions/ipipe.py (ifile/ils): Readd output of the parent directory which as been dropped in r1703. IPython/Extensions/ipipe.py (iless): Fixed. IPython/Extensions/ibrowse: Fixed sorting under Python 2.3. More docstrings. Moved xrepr(), xiter() and xattrs() documentation into the docstring of the default implementation.

File last commit:

r0:6f629fcc
r415:4a5dcb15
Show More
ipythonrc-pysh
94 lines | 3.5 KiB | text/plain | TextLexer
# -*- Mode: Shell-Script -*- Not really, but shows comments correctly
#***************************************************************************
# Configuration file for ipython -- ipythonrc format
#
# The format of this file is one of 'key value' lines.
# Lines containing only whitespace at the beginning and then a # are ignored
# as comments. But comments can NOT be put on lines with data.
#***************************************************************************
# If this file is found in the user's ~/.ipython directory as ipythonrc-pysh,
# it can be loaded by calling passing the '-profile pysh' (or '-p pysh')
# option to IPython.
# This profile turns IPython into a lightweight system shell with python
# syntax.
# We only set a few options here, the rest is done in the companion pysh.py
# file. In the future _all_ of IPython's configuration will be done via
# proper python code.
############################################################################
# First load common user configuration
include ipythonrc
############################################################################
# Load all the actual syntax extensions for shell-like operation, which live
# in the InterpreterExec standard extension.
import_all IPython.Extensions.InterpreterExec
############################################################################
# PROMPTS
#
# Configure prompt for more shell-like usage.
# Most bash-like escapes can be used to customize IPython's prompts, as well as
# a few additional ones which are IPython-specific. All valid prompt escapes
# are described in detail in the Customization section of the IPython HTML/PDF
# manual.
prompt_in1 '\C_LightGreen\u@\h\C_LightBlue[\C_LightCyan\Y1\C_LightBlue]\C_Green|\#> '
prompt_in2 '\C_Green|\C_LightGreen\D\C_Green> '
prompt_out '<\#> '
# Here's a more complex prompt, showing the hostname and more path depth (\Y3)
#prompt_in1 '\C_LightRed\u\C_Blue@\C_Red\h\C_LightBlue[\C_LightCyan\Y3\C_LightBlue]\C_LightGreen\#> '
# Select whether to left-pad the output prompts to match the length of the
# input ones. This allows you for example to use a simple '>' as an output
# prompt, and yet have the output line up with the input. If set to false,
# the output prompts will be unpadded (flush left).
prompts_pad_left 1
# Remove all blank lines in between prompts, like a normal shell.
separate_in 0
separate_out 0
separate_out2 0
# Allow special syntax (!, magics and aliases) in multiline input
multi_line_specials 1
############################################################################
# ALIASES
# Declare some common aliases. Type alias? at an ipython prompt for details on
# the syntax, use @unalias to delete existing aliases.
# Don't go too crazy here, the file pysh.py called below runs @rehash, which
# loads ALL of your $PATH as aliases (except for Python keywords and
# builtins).
# Some examples:
# A simple alias without arguments
#alias cl clear
# An alias which expands the full line before the end of the alias. This
# lists only directories:
#alias ldir pwd;ls -oF --color %l | grep /$
# An alias with two positional arguments:
#alias parts echo 'First <%s> Second <%s>'
# In use these two aliases give (note that ldir is already built into IPython
# for Unix):
#fperez[IPython]16> ldir
#/usr/local/home/fperez/ipython/ipython/IPython
#drwxr-xr-x 2 fperez 4096 Jun 21 01:01 CVS/
#drwxr-xr-x 3 fperez 4096 Jun 21 01:10 Extensions/
#drwxr-xr-x 3 fperez 4096 Jun 21 01:27 UserConfig/
#fperez[IPython]17> parts Hello world and goodbye
#First <Hello> Second <world> and goodbye