1 .TH PYTHON "4 January 1995"
3 python \- an interpreted, interactive, object-oriented programming language
36 Python is an interpreted, interactive, object-oriented programming
37 language that combines remarkable power with very clear syntax.
38 For an introduction to programming in Python you are referred to the
40 The Python Library Reference documents built-in and standard types,
41 constants, functions and modules.
42 Finally, the Python Reference Manual describes the syntax and
43 semantics of the core language in (perhaps too) much detail.
45 Python's basic power can be extended with your own modules written in
47 On some (most?) systems such modules may be dynamically loaded.
48 Python is also adaptable as an extension language for existing
50 See the internal documentation for hints.
51 .SH COMMAND LINE OPTIONS
54 Turn on parser debugging output (for wizards only, depending on
58 When a script is passed as first argument or the \fB\-c\fP option is
59 used, enter interactive mode after executing the script or the
60 command. It does not read the $PYTHONSTARTUP file. This can be
61 useful to inspect global variables or a stack trace when a script
65 Suppresses the automatic printing of expressions entered in
66 interactive mode (useful when input is actually generated e.g. by
70 Force stdout and stderr to be totally unbuffered.
73 Print a message each time a module is initialized, showing the place
74 (filename or built-in module) from which it is loaded.
77 Specify the command to execute (see next section).
78 This terminates the option list (following options are passed as
79 arguments to the command).
81 When the interpreter is configured to contain the
83 built-in module for use with the X window system, additional command
84 line options common to most X applications are recognized (by STDWIN),
91 The complete set of options is described in the STDWIN documentation.
92 .SH INTERPRETER INTERFACE
93 The interpreter interface resembles that of the UNIX shell: when
94 called with standard input connected to a tty device, it prompts for
95 commands and executes them until an EOF is read; when called with a
96 file name argument or with a file as standard input, it reads and
103 it executes the Python statement(s) given as
107 may contain multiple statements separated by newlines.
108 Leading whitespace is significant in Python statements!
109 In non-interactive mode, the entire input is parsed befored it is
112 If available, the script name and additional arguments thereafter are
113 passed to the script in the Python variable
115 which is a list of strings (you must first
117 to be able to access it).
118 If no script name is given,
126 Note that options interpreter by the Python interpreter or by STDWIN
130 In interactive mode, the primary prompt is `>>>'; the second prompt
131 (which appears when a command is not complete) is `...'.
132 The prompts can be changed by assignment to
136 The interpreter quits when it reads an EOF at a prompt.
137 When an unhandled exception occurs, a stack trace is printed and
138 control returns to the primary prompt; in non-interactive mode, the
139 interpreter exits after printing the stack trace.
140 The interrupt signal raises the
141 .I Keyboard\%Interrupt
142 exception; other UNIX signals are not caught (except that SIGPIPE is
143 sometimes ignored, in favor of the
145 exception). Error messages are written to stderr.
146 .SH FILES AND DIRECTORIES
147 These are subject to difference depending on local installation
149 .IP /usr/local/bin/python
150 Recommended location of the interpreter.
151 .IP /usr/local/lib/python
152 Recommended location of the directory containing the standard modules.
153 .SH ENVIRONMENT VARIABLES
155 Augments the default search path for module files.
156 The format is the same as the shell's $PATH: one or more directory
157 pathnames separated by colons.
158 Non-existant directories are silently ignored.
159 The default search path is installation dependent, but always begins
160 with `.', (for example,
161 .I .:/usr/local/lib/python ).
162 The default search path is appended to $PYTHONPATH.
163 The search path can be manipulated from within a Python program as the
167 If this is the name of a readable file, the Python commands in that
168 file are executed before the first prompt is displayed in interactive
170 The file is executed in the same name space where interactive commands
171 are executed so that objects defined or imported in it can be used
172 without qualification in the interactive session.
173 You can also change the prompts
179 If this is set to a non-empty string it is equivalent to specifying
180 the \fB\-d\fP option.
182 If this is set to a non-empty string it is equivalent to specifying
183 the \fB\-i\fP option.
185 If this is set to a non-empty string it is equivalent to specifying
186 the \fB\-s\fP option.
188 If this is set to a non-empty string it is equivalent to specifying
189 the \fB\-u\fP option.
191 If this is set to a non-empty string it is equivalent to specifying
192 the \fB\-v\fP option.
196 Python Library Reference
198 Python Reference Manual
204 is imported, it initializes the STDWIN library.
205 If this initialization fails, e.g. because the display connection
206 fails, the interpreter aborts immediately.
210 CWI (Centrum voor Wiskunde en Informatica)
215 E-mail: Guido.van.Rossum@cwi.nl
218 There is a mailing list devoted to Python programming, bugs and
220 To subscribe, send mail containing your real name and e-mail address
222 .I python-list-request@cwi.nl.
224 Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam,
229 Permission to use, copy, modify, and distribute this software and its
230 documentation for any purpose and without fee is hereby granted,
231 provided that the above copyright notice appear in all copies and that
232 both that copyright notice and this permission notice appear in
233 supporting documentation, and that the names of Stichting Mathematisch
234 Centrum or CWI not be used in advertising or publicity pertaining to
235 distribution of the software without specific, written prior permission.
237 STICHTING MATHEMATISCH CENTRUM DISCLAIMS ALL WARRANTIES WITH REGARD TO
238 THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
239 FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH CENTRUM BE LIABLE
240 FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
241 WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
242 ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
243 OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.