##// END OF EJS Templates
Updated the main introduction to IPython in the Sphinx docs.
Brian E Granger -
Show More
@@ -1,3 +1,5 b''
1 .. _install_index:
2
1 ==================
3 ==================
2 Installation
4 Installation
3 ==================
5 ==================
@@ -4,18 +4,6 b''
4 Introduction
4 Introduction
5 ============
5 ============
6
6
7 This is the official documentation for IPython 0.x series (i.e. what
8 we are used to refer to just as "IPython"). The original text of the
9 manual (most of which is still in place) has been authored by Fernando
10 Perez, but as recommended usage patterns and new features have
11 emerged, this manual has been updated to reflect that fact. Most of
12 the additions have been authored by Ville M. Vainio.
13
14 The manual has been generated from reStructuredText source markup with
15 Sphinx, which should make it much easier to keep it up-to-date in the
16 future. Some reST artifacts and bugs may still be apparent in the
17 documentation, but this should improve as the toolchain matures.
18
19 Overview
7 Overview
20 ========
8 ========
21
9
@@ -25,8 +13,19 b' creating test files as is typical in most programming languages.'
25 However, the interpreter supplied with the standard Python distribution
13 However, the interpreter supplied with the standard Python distribution
26 is somewhat limited for extended interactive use.
14 is somewhat limited for extended interactive use.
27
15
28 IPython is a free software project (released under the BSD license)
16 The goal of IPython is to create a comprehensive environment for
29 which tries to:
17 interactive and exploratory computing. To support, this goal, IPython
18 has two main components:
19
20 * An enhanced interactive Python shell.
21 * An architecture for interactive parallel computing.
22
23 All of IPython is open source (released under the revised BSD license).
24
25 Enhanced interactive Python shell
26 =================================
27
28 IPython's interactive shell (`ipython`), has the following goals:
30
29
31 1. Provide an interactive shell superior to Python's default. IPython
30 1. Provide an interactive shell superior to Python's default. IPython
32 has many features for object introspection, system shell access,
31 has many features for object introspection, system shell access,
@@ -50,17 +49,16 b' which tries to:'
50 WX applications via special threading flags. The normal Python
49 WX applications via special threading flags. The normal Python
51 shell can only do this for Tkinter applications.
50 shell can only do this for Tkinter applications.
52
51
53
52 Main features of the interactive shell
54 Main features
53 --------------------------------------
55 -------------
56
54
57 * Dynamic object introspection. One can access docstrings, function
55 * Dynamic object introspection. One can access docstrings, function
58 definition prototypes, source code, source files and other details
56 definition prototypes, source code, source files and other details
59 of any object accessible to the interpreter with a single
57 of any object accessible to the interpreter with a single
60 keystroke ('?', and using '??' provides additional detail).
58 keystroke (:samp:`?`, and using :samp:`??` provides additional detail).
61 * Searching through modules and namespaces with '*' wildcards, both
59 * Searching through modules and namespaces with :samp:`*` wildcards, both
62 when using the '?' system and via the %psearch command.
60 when using the :samp:`?` system and via the :samp:`%psearch` command.
63 * Completion in the local namespace, by typing TAB at the prompt.
61 * Completion in the local namespace, by typing :kbd:`TAB` at the prompt.
64 This works for keywords, modules, methods, variables and files in the
62 This works for keywords, modules, methods, variables and files in the
65 current directory. This is supported via the readline library, and
63 current directory. This is supported via the readline library, and
66 full access to configuring readline's behavior is provided.
64 full access to configuring readline's behavior is provided.
@@ -70,31 +68,31 b' Main features'
70 across sessions and tied to each profile), full searching in this
68 across sessions and tied to each profile), full searching in this
71 history and caching of all input and output.
69 history and caching of all input and output.
72 * User-extensible 'magic' commands. A set of commands prefixed with
70 * User-extensible 'magic' commands. A set of commands prefixed with
73 % is available for controlling IPython itself and provides
71 :samp:`%` is available for controlling IPython itself and provides
74 directory control, namespace information and many aliases to
72 directory control, namespace information and many aliases to
75 common system shell commands.
73 common system shell commands.
76 * Alias facility for defining your own system aliases.
74 * Alias facility for defining your own system aliases.
77 * Complete system shell access. Lines starting with ! are passed
75 * Complete system shell access. Lines starting with :samp:`!` are passed
78 directly to the system shell, and using !! or var = !cmd
76 directly to the system shell, and using :samp:`!!` or :samp:`var = !cmd`
79 captures shell output into python variables for further use.
77 captures shell output into python variables for further use.
80 * Background execution of Python commands in a separate thread.
78 * Background execution of Python commands in a separate thread.
81 IPython has an internal job manager called jobs, and a
79 IPython has an internal job manager called jobs, and a
82 conveninence backgrounding magic function called %bg.
80 conveninence backgrounding magic function called :samp:`%bg`.
83 * The ability to expand python variables when calling the system
81 * The ability to expand python variables when calling the system
84 shell. In a shell command, any python variable prefixed with $ is
82 shell. In a shell command, any python variable prefixed with :samp:`$` is
85 expanded. A double $$ allows passing a literal $ to the shell (for
83 expanded. A double :samp:`$$` allows passing a literal :samp:`$` to the shell (for
86 access to shell and environment variables like $PATH).
84 access to shell and environment variables like :envvar:`PATH`).
87 * Filesystem navigation, via a magic %cd command, along with a
85 * Filesystem navigation, via a magic :samp:`%cd` command, along with a
88 persistent bookmark system (using %bookmark) for fast access to
86 persistent bookmark system (using :samp:`%bookmark`) for fast access to
89 frequently visited directories.
87 frequently visited directories.
90 * A lightweight persistence framework via the %store command, which
88 * A lightweight persistence framework via the :samp:`%store` command, which
91 allows you to save arbitrary Python variables. These get restored
89 allows you to save arbitrary Python variables. These get restored
92 automatically when your session restarts.
90 automatically when your session restarts.
93 * Automatic indentation (optional) of code as you type (through the
91 * Automatic indentation (optional) of code as you type (through the
94 readline library).
92 readline library).
95 * Macro system for quickly re-executing multiple lines of previous
93 * Macro system for quickly re-executing multiple lines of previous
96 input with a single name. Macros can be stored persistently via
94 input with a single name. Macros can be stored persistently via
97 %store and edited via %edit.
95 :samp:`%store` and edited via :samp:`%edit`.
98 * Session logging (you can then later use these logs as code in your
96 * Session logging (you can then later use these logs as code in your
99 programs). Logs can optionally timestamp all input, and also store
97 programs). Logs can optionally timestamp all input, and also store
100 session output (marked as comments, so the log remains valid
98 session output (marked as comments, so the log remains valid
@@ -106,15 +104,15 b' Main features'
106 debugging information (basically a terminal version of the cgitb
104 debugging information (basically a terminal version of the cgitb
107 module).
105 module).
108 * Auto-parentheses: callable objects can be executed without
106 * Auto-parentheses: callable objects can be executed without
109 parentheses: 'sin 3' is automatically converted to 'sin(3)'.
107 parentheses: :samp:`sin 3` is automatically converted to :samp:`sin(3)`.
110 * Auto-quoting: using ',' or ';' as the first character forces
108 * Auto-quoting: using :samp:`,`, or :samp:`;` as the first character forces
111 auto-quoting of the rest of the line: ',my_function a b' becomes
109 auto-quoting of the rest of the line: :samp:`,my_function a b` becomes
112 automatically 'my_function("a","b")', while ';my_function a b'
110 automatically :samp:`my_function("a","b")`, while :samp:`;my_function a b`
113 becomes 'my_function("a b")'.
111 becomes :samp:`my_function("a b")`.
114 * Extensible input syntax. You can define filters that pre-process
112 * Extensible input syntax. You can define filters that pre-process
115 user input to simplify input in special situations. This allows
113 user input to simplify input in special situations. This allows
116 for example pasting multi-line code fragments which start with
114 for example pasting multi-line code fragments which start with
117 '>>>' or '...' such as those from other python sessions or the
115 :samp:`>>>` or :samp:`...` such as those from other python sessions or the
118 standard Python documentation.
116 standard Python documentation.
119 * Flexible configuration system. It uses a configuration file which
117 * Flexible configuration system. It uses a configuration file which
120 allows permanent setting of all command-line options, module
118 allows permanent setting of all command-line options, module
@@ -131,59 +129,46 b' Main features'
131 uncaught exception. This drops you inside the code which triggered
129 uncaught exception. This drops you inside the code which triggered
132 the exception with all the data live and it is possible to
130 the exception with all the data live and it is possible to
133 navigate the stack to rapidly isolate the source of a bug. The
131 navigate the stack to rapidly isolate the source of a bug. The
134 %run magic command -with the -d option- can run any script under
132 :samp:`%run` magic command (with the :samp:`-d` option) can run any script under
135 pdb's control, automatically setting initial breakpoints for you.
133 pdb's control, automatically setting initial breakpoints for you.
136 This version of pdb has IPython-specific improvements, including
134 This version of pdb has IPython-specific improvements, including
137 tab-completion and traceback coloring support. For even easier
135 tab-completion and traceback coloring support. For even easier
138 debugger access, try %debug after seeing an exception. winpdb is
136 debugger access, try :samp:`%debug` after seeing an exception. winpdb is
139 also supported, see ipy_winpdb extension.
137 also supported, see ipy_winpdb extension.
140 * Profiler support. You can run single statements (similar to
138 * Profiler support. You can run single statements (similar to
141 profile.run()) or complete programs under the profiler's control.
139 :samp:`profile.run()`) or complete programs under the profiler's control.
142 While this is possible with standard cProfile or profile modules,
140 While this is possible with standard cProfile or profile modules,
143 IPython wraps this functionality with magic commands (see '%prun'
141 IPython wraps this functionality with magic commands (see :samp:`%prun`
144 and '%run -p') convenient for rapid interactive work.
142 and :samp:`%run -p`) convenient for rapid interactive work.
145 * Doctest support. The special %doctest_mode command toggles a mode
143 * Doctest support. The special :samp:`%doctest_mode` command toggles a mode
146 that allows you to paste existing doctests (with leading '>>>'
144 that allows you to paste existing doctests (with leading :samp:`>>>`
147 prompts and whitespace) and uses doctest-compatible prompts and
145 prompts and whitespace) and uses doctest-compatible prompts and
148 output, so you can use IPython sessions as doctest code.
146 output, so you can use IPython sessions as doctest code.
149
147
148 Interactive parallel computing
149 ==============================
150
151 Increasingly, parallel computer hardware, such as multicore CPUs, clusters and supercomputers, is becoming ubiquitous. Over the last 3 years, we have developed an
152 architecture within IPython that allows such hardware to be used quickly and easily
153 from Python. Moreover, this architecture is designed to support interactive and
154 collaborative parallel computing.
155
156 For more information, see our :ref:`overview <parallel_index>` of using IPython for
157 parallel computing.
150
158
151 Portability and Python requirements
159 Portability and Python requirements
152 -----------------------------------
160 -----------------------------------
153
161
154 Python requirements: IPython requires with Python version 2.3 or newer.
162 As of the 0.9 release, IPython requires Python 2.4 or greater. We have
155 If you are still using Python 2.2 and can not upgrade, the last version
163 not begun to test IPython on Python 2.6 or 3.0, but we expect it will
156 of IPython which worked with Python 2.2 was 0.6.15, so you will have to
164 work with some minor changes.
157 use that.
165
158
166 IPython is known to work on the following operating systems:
159 IPython is developed under Linux, but it should work in any reasonable
167
160 Unix-type system (tested OK under Solaris and the BSD family, for which
168 * Linux
161 a port exists thanks to Dryice Liu).
169 * AIX
162
170 * Most other Unix-like OSs (Solaris, BSD, etc.)
163 Mac OS X: it works, apparently without any problems (thanks to Jim Boyle
171 * Mac OS X
164 at Lawrence Livermore for the information). Thanks to Andrea Riciputi,
172 * Windows (CygWin, XP, Vista, etc.)
165 Fink support is available.
173
166
174 See :ref:`here <install_index>` for instructions on how to install IPython. No newline at end of file
167 CygWin: it works mostly OK, though some users have reported problems
168 with prompt coloring. No satisfactory solution to this has been found so
169 far, you may want to disable colors permanently in the ipythonrc
170 configuration file if you experience problems. If you have proper color
171 support under cygwin, please post to the IPython mailing list so this
172 issue can be resolved for all users.
173
174 Windows: it works well under Windows Vista/XP/2k, and I suspect NT should
175 behave similarly. Section "Installation under windows" describes
176 installation details for Windows, including some additional tools needed
177 on this platform.
178
179 Windows 9x support is present, and has been reported to work fine (at
180 least on WinME).
181
182 Location
183 --------
184
185 IPython is generously hosted at http://ipython.scipy.org by the
186 Enthought, Inc and the SciPy project. This site offers downloads,
187 subversion access, mailing lists and a bug tracking system. I am very
188 grateful to Enthought (http://www.enthought.com) and all of the SciPy
189 team for their contribution. No newline at end of file
@@ -1,3 +1,5 b''
1 .. _parallel_index:
2
1 ====================================
3 ====================================
2 Using IPython for Parallel computing
4 Using IPython for Parallel computing
3 ====================================
5 ====================================
General Comments 0
You need to be logged in to leave comments. Login now