From 5b2e581d3e835d13cf9f8333fe5513ae9570940b 2007-09-04 21:10:10 From: vivainio Date: 2007-09-04 21:10:10 Subject: [PATCH] Change banner, %quickref --- diff --git a/IPython/ipmaker.py b/IPython/ipmaker.py index 0183eb4..5db3786 100644 --- a/IPython/ipmaker.py +++ b/IPython/ipmaker.py @@ -6,7 +6,7 @@ Requires Python 2.1 or better. This file contains the main make_IPython() starter function. -$Id: ipmaker.py 2704 2007-09-01 14:32:05Z vivainio $""" +$Id: ipmaker.py 2710 2007-09-04 21:10:10Z vivainio $""" #***************************************************************************** # Copyright (C) 2001-2006 Fernando Perez. @@ -112,10 +112,10 @@ def make_IPython(argv=None,user_ns=None,user_global_ns=None,debug=1, "IPython %s -- An enhanced Interactive Python." % (__version__,), """\ -? or %quickref -> Introduction to IPython's features, or quick reference. -%magic -> Information about IPython's 'magic' % functions. -help -> Python's own help system. -object? -> Details about 'object'. ?object also works, ?? prints more. +? -> Introduction to IPython's features +%quickref -> Quick reference. +help -> Python's own help system. +object? -> Details about 'object'. ?object also works, ?? prints more. """ ] IP.usage = interactive_usage diff --git a/IPython/usage.py b/IPython/usage.py index a266e45..9741db4 100644 --- a/IPython/usage.py +++ b/IPython/usage.py @@ -6,7 +6,7 @@ # the file COPYING, distributed as part of this software. #***************************************************************************** -# $Id: usage.py 2683 2007-08-28 20:01:15Z vivainio $ +# $Id: usage.py 2710 2007-09-04 21:10:10Z vivainio $ from IPython import Release __author__ = '%s <%s>' % Release.authors['Fernando'] @@ -605,11 +605,16 @@ IPython -- An enhanced Interactive Python - Quick Reference Card obj?, obj??, ?obj,??obj : Get help, or more help for object ?os.p* : List names in os starting with p -Example magic: - +Magic functions are prefixed by %, and typically take their arguments without +parentheses, quotes or even commas for convenience. + +Example magic function calls: + %alias d ls -F : 'd' is now an alias for 'ls -F' alias d ls -F : Works if 'alias' not a python name alist = %alias : Get list of aliases to 'alist' +cd /usr/share : Obvious. cd - to choose from visited dirs. +%cd?? : See help AND source for magic %cd System commands: @@ -618,7 +623,6 @@ cp a.txt b/ : after %rehashx, most system commands work without ! cp ${f}.txt $bar : Variable expansion in magics and system commands files = !ls /usr : Capture sytem command output files.s, files.l, files.n: "a b c", ['a','b','c'], 'a\nb\nc' -cd /usr/share : Obvious. cd - to choose from visited dirs. History: @@ -629,7 +633,7 @@ exec _i81 : Execute input history line #81 again _, __, ___ : previous, next previous, next next previous output _dh : Directory history _oh : Output history -%hist : Command history. '-g foo' search history for 'foo' +%hist : Command history. '%hist -g foo' search history for 'foo' Autocall: @@ -638,6 +642,11 @@ f 1,2 : f(1,2) ,f 1 2 : f("1","2") ;f 1 2 : f("1 2") +Remember: TAB completion works in many contexts, not just file names +or python names. + +The following magic functions are currently available: + """ diff --git a/doc/ChangeLog b/doc/ChangeLog index 3e1a0ea..0bc300c 100644 --- a/doc/ChangeLog +++ b/doc/ChangeLog @@ -2,6 +2,9 @@ * ipy_profile_zope.py: add zope profile, by Stefan Eletzhofer. Relicensed under BSD with the authors approval. + + * ipmaker.py, usage.py: Remove %magic from default banner, improve + %quickref 2007-09-03 Ville Vainio