Mercurial > cpython-lru_cache-weakref
annotate Misc/python.man @ 4503:65d2d8e67da3 legacy-trunk
New permission notice, includes CNRI.
| author | Guido van Rossum <guido@python.org> |
|---|---|
| date | Fri, 25 Oct 1996 14:44:06 +0000 |
| parents | 2838db83d0ed |
| children | a2d3c2a62a30 |
| rev | line source |
|---|---|
|
3875
2838db83d0ed
Got rid of all references to stdwin.
Guido van Rossum <guido@python.org>
parents:
2068
diff
changeset
|
1 .TH PYTHON "30 July 1996" |
| 1529 | 2 .SH NAME |
| 3 python \- an interpreted, interactive, object-oriented programming language | |
| 4 .SH SYNOPSIS | |
| 5 .B python | |
| 6 [ | |
| 7 .B \-d | |
| 8 ] | |
| 9 [ | |
| 10 .B \-i | |
| 11 ] | |
| 12 [ | |
|
1656
4def934ff75b
Document -s option -- suppress printing of top-level expressions
Guido van Rossum <guido@python.org>
parents:
1601
diff
changeset
|
13 .B \-s |
|
4def934ff75b
Document -s option -- suppress printing of top-level expressions
Guido van Rossum <guido@python.org>
parents:
1601
diff
changeset
|
14 ] |
|
4def934ff75b
Document -s option -- suppress printing of top-level expressions
Guido van Rossum <guido@python.org>
parents:
1601
diff
changeset
|
15 [ |
|
1601
57b9b77da21b
Documented -u (unbuffered), undocumented -k (killprint)
Guido van Rossum <guido@python.org>
parents:
1559
diff
changeset
|
16 .B \-u |
| 1529 | 17 ] |
| 18 [ | |
| 19 .B \-v | |
| 20 ] | |
| 21 [ | |
| 22 .B \-c | |
| 23 .I command | |
| 24 | | |
| 25 .I script | |
| 26 | | |
| 27 \- | |
| 28 ] | |
| 29 [ | |
| 30 .I arguments | |
| 31 ] | |
| 32 .SH DESCRIPTION | |
| 33 Python is an interpreted, interactive, object-oriented programming | |
| 34 language that combines remarkable power with very clear syntax. | |
| 35 For an introduction to programming in Python you are referred to the | |
| 36 Python Tutorial. | |
| 37 The Python Library Reference documents built-in and standard types, | |
| 38 constants, functions and modules. | |
| 39 Finally, the Python Reference Manual describes the syntax and | |
| 40 semantics of the core language in (perhaps too) much detail. | |
| 41 .PP | |
| 42 Python's basic power can be extended with your own modules written in | |
| 43 C or C++. | |
|
3875
2838db83d0ed
Got rid of all references to stdwin.
Guido van Rossum <guido@python.org>
parents:
2068
diff
changeset
|
44 On most systems such modules may be dynamically loaded. |
| 1529 | 45 Python is also adaptable as an extension language for existing |
| 46 applications. | |
| 47 See the internal documentation for hints. | |
| 48 .SH COMMAND LINE OPTIONS | |
| 49 .TP | |
| 50 .B \-d | |
| 51 Turn on parser debugging output (for wizards only, depending on | |
| 52 compilation options). | |
|
1559
df0fb788c0c1
Fix weird messed up paragraphs
Guido van Rossum <guido@python.org>
parents:
1529
diff
changeset
|
53 .TP |
| 1529 | 54 .B \-i |
| 55 When a script is passed as first argument or the \fB\-c\fP option is | |
| 56 used, enter interactive mode after executing the script or the | |
|
1559
df0fb788c0c1
Fix weird messed up paragraphs
Guido van Rossum <guido@python.org>
parents:
1529
diff
changeset
|
57 command. It does not read the $PYTHONSTARTUP file. This can be |
|
df0fb788c0c1
Fix weird messed up paragraphs
Guido van Rossum <guido@python.org>
parents:
1529
diff
changeset
|
58 useful to inspect global variables or a stack trace when a script |
|
df0fb788c0c1
Fix weird messed up paragraphs
Guido van Rossum <guido@python.org>
parents:
1529
diff
changeset
|
59 raises an exception. |
| 1529 | 60 .TP |
|
1656
4def934ff75b
Document -s option -- suppress printing of top-level expressions
Guido van Rossum <guido@python.org>
parents:
1601
diff
changeset
|
61 .B \-s |
|
4def934ff75b
Document -s option -- suppress printing of top-level expressions
Guido van Rossum <guido@python.org>
parents:
1601
diff
changeset
|
62 Suppresses the automatic printing of expressions entered in |
|
4def934ff75b
Document -s option -- suppress printing of top-level expressions
Guido van Rossum <guido@python.org>
parents:
1601
diff
changeset
|
63 interactive mode (useful when input is actually generated e.g. by |
|
4def934ff75b
Document -s option -- suppress printing of top-level expressions
Guido van Rossum <guido@python.org>
parents:
1601
diff
changeset
|
64 Emacs). |
|
4def934ff75b
Document -s option -- suppress printing of top-level expressions
Guido van Rossum <guido@python.org>
parents:
1601
diff
changeset
|
65 .TP |
|
1601
57b9b77da21b
Documented -u (unbuffered), undocumented -k (killprint)
Guido van Rossum <guido@python.org>
parents:
1559
diff
changeset
|
66 .B \-u |
|
57b9b77da21b
Documented -u (unbuffered), undocumented -k (killprint)
Guido van Rossum <guido@python.org>
parents:
1559
diff
changeset
|
67 Force stdout and stderr to be totally unbuffered. |
| 1529 | 68 .TP |
| 69 .B \-v | |
| 70 Print a message each time a module is initialized, showing the place | |
| 71 (filename or built-in module) from which it is loaded. | |
| 72 .TP | |
| 73 .BI "\-c " command | |
| 74 Specify the command to execute (see next section). | |
| 75 This terminates the option list (following options are passed as | |
| 76 arguments to the command). | |
| 77 .SH INTERPRETER INTERFACE | |
| 78 The interpreter interface resembles that of the UNIX shell: when | |
| 79 called with standard input connected to a tty device, it prompts for | |
| 80 commands and executes them until an EOF is read; when called with a | |
| 81 file name argument or with a file as standard input, it reads and | |
| 82 executes a | |
| 83 .I script | |
| 84 from that file; | |
| 85 when called with | |
| 86 .B \-c | |
| 87 .I command, | |
| 88 it executes the Python statement(s) given as | |
| 89 .I command. | |
| 90 Here | |
| 91 .I command | |
| 92 may contain multiple statements separated by newlines. | |
| 93 Leading whitespace is significant in Python statements! | |
| 94 In non-interactive mode, the entire input is parsed befored it is | |
| 95 executed. | |
| 96 .PP | |
| 97 If available, the script name and additional arguments thereafter are | |
| 98 passed to the script in the Python variable | |
| 99 .I sys.argv , | |
| 100 which is a list of strings (you must first | |
| 101 .I import sys | |
| 102 to be able to access it). | |
| 103 If no script name is given, | |
| 104 .I sys.argv | |
| 105 is empty; if | |
| 106 .B \-c | |
| 107 is used, | |
| 108 .I sys.argv[0] | |
| 109 contains the string | |
| 110 .I '-c'. | |
|
3875
2838db83d0ed
Got rid of all references to stdwin.
Guido van Rossum <guido@python.org>
parents:
2068
diff
changeset
|
111 Note that options interpreted by the Python interpreter itself |
| 1529 | 112 are not placed in |
| 113 .I sys.argv. | |
| 114 .PP | |
| 115 In interactive mode, the primary prompt is `>>>'; the second prompt | |
| 116 (which appears when a command is not complete) is `...'. | |
| 117 The prompts can be changed by assignment to | |
| 118 .I sys.ps1 | |
| 119 or | |
| 120 .I sys.ps2. | |
| 121 The interpreter quits when it reads an EOF at a prompt. | |
| 122 When an unhandled exception occurs, a stack trace is printed and | |
| 123 control returns to the primary prompt; in non-interactive mode, the | |
| 124 interpreter exits after printing the stack trace. | |
| 125 The interrupt signal raises the | |
| 126 .I Keyboard\%Interrupt | |
| 127 exception; other UNIX signals are not caught (except that SIGPIPE is | |
| 128 sometimes ignored, in favor of the | |
| 129 .I IOError | |
| 130 exception). Error messages are written to stderr. | |
| 131 .SH FILES AND DIRECTORIES | |
| 132 These are subject to difference depending on local installation | |
| 133 conventions: | |
| 134 .IP /usr/local/bin/python | |
| 135 Recommended location of the interpreter. | |
|
3875
2838db83d0ed
Got rid of all references to stdwin.
Guido van Rossum <guido@python.org>
parents:
2068
diff
changeset
|
136 .IP /usr/local/lib/python1.4 |
| 1529 | 137 Recommended location of the directory containing the standard modules. |
| 138 .SH ENVIRONMENT VARIABLES | |
| 139 .IP PYTHONPATH | |
| 140 Augments the default search path for module files. | |
| 141 The format is the same as the shell's $PATH: one or more directory | |
| 142 pathnames separated by colons. | |
| 143 Non-existant directories are silently ignored. | |
| 144 The default search path is installation dependent, but always begins | |
| 145 with `.', (for example, | |
| 146 .I .:/usr/local/lib/python ). | |
| 147 The default search path is appended to $PYTHONPATH. | |
|
3875
2838db83d0ed
Got rid of all references to stdwin.
Guido van Rossum <guido@python.org>
parents:
2068
diff
changeset
|
148 If a script argument is given, the directory containing the script is |
|
2838db83d0ed
Got rid of all references to stdwin.
Guido van Rossum <guido@python.org>
parents:
2068
diff
changeset
|
149 inserted in the path in front of $PYTHONPATH. |
| 1529 | 150 The search path can be manipulated from within a Python program as the |
| 151 variable | |
| 152 .I sys.path . | |
| 153 .IP PYTHONSTARTUP | |
| 154 If this is the name of a readable file, the Python commands in that | |
| 155 file are executed before the first prompt is displayed in interactive | |
| 156 mode. | |
| 157 The file is executed in the same name space where interactive commands | |
| 158 are executed so that objects defined or imported in it can be used | |
| 159 without qualification in the interactive session. | |
| 160 You can also change the prompts | |
| 161 .I sys.ps1 | |
| 162 and | |
| 163 .I sys.ps2 | |
| 164 in this file. | |
| 165 .IP PYTHONDEBUG | |
| 166 If this is set to a non-empty string it is equivalent to specifying | |
| 167 the \fB\-d\fP option. | |
| 168 .IP PYTHONINSPECT | |
| 169 If this is set to a non-empty string it is equivalent to specifying | |
| 170 the \fB\-i\fP option. | |
|
1656
4def934ff75b
Document -s option -- suppress printing of top-level expressions
Guido van Rossum <guido@python.org>
parents:
1601
diff
changeset
|
171 .IP PYTHONSUPPRESS |
|
4def934ff75b
Document -s option -- suppress printing of top-level expressions
Guido van Rossum <guido@python.org>
parents:
1601
diff
changeset
|
172 If this is set to a non-empty string it is equivalent to specifying |
|
4def934ff75b
Document -s option -- suppress printing of top-level expressions
Guido van Rossum <guido@python.org>
parents:
1601
diff
changeset
|
173 the \fB\-s\fP option. |
|
1601
57b9b77da21b
Documented -u (unbuffered), undocumented -k (killprint)
Guido van Rossum <guido@python.org>
parents:
1559
diff
changeset
|
174 .IP PYTHONUNBUFFERED |
| 1529 | 175 If this is set to a non-empty string it is equivalent to specifying |
|
1601
57b9b77da21b
Documented -u (unbuffered), undocumented -k (killprint)
Guido van Rossum <guido@python.org>
parents:
1559
diff
changeset
|
176 the \fB\-u\fP option. |
| 1529 | 177 .IP PYTHONVERBOSE |
| 178 If this is set to a non-empty string it is equivalent to specifying | |
| 179 the \fB\-v\fP option. | |
| 180 .SH SEE ALSO | |
| 181 Python Tutorial | |
| 182 .br | |
| 183 Python Library Reference | |
| 184 .br | |
| 185 Python Reference Manual | |
| 186 .SH AUTHOR | |
| 187 .nf | |
| 188 Guido van Rossum | |
|
3875
2838db83d0ed
Got rid of all references to stdwin.
Guido van Rossum <guido@python.org>
parents:
2068
diff
changeset
|
189 CNRI |
|
2838db83d0ed
Got rid of all references to stdwin.
Guido van Rossum <guido@python.org>
parents:
2068
diff
changeset
|
190 1895 Preston White Drive |
|
2838db83d0ed
Got rid of all references to stdwin.
Guido van Rossum <guido@python.org>
parents:
2068
diff
changeset
|
191 Reston, VA 20191 |
|
2838db83d0ed
Got rid of all references to stdwin.
Guido van Rossum <guido@python.org>
parents:
2068
diff
changeset
|
192 USA |
| 1529 | 193 .PP |
|
3875
2838db83d0ed
Got rid of all references to stdwin.
Guido van Rossum <guido@python.org>
parents:
2068
diff
changeset
|
194 E-mail: guido@cnri.reston.va.us, guido@python.org |
| 1529 | 195 .fi |
|
3875
2838db83d0ed
Got rid of all references to stdwin.
Guido van Rossum <guido@python.org>
parents:
2068
diff
changeset
|
196 .SH INTERNET RESOURCES |
|
2838db83d0ed
Got rid of all references to stdwin.
Guido van Rossum <guido@python.org>
parents:
2068
diff
changeset
|
197 Web site: http://www.python.org |
|
2838db83d0ed
Got rid of all references to stdwin.
Guido van Rossum <guido@python.org>
parents:
2068
diff
changeset
|
198 .br |
|
2838db83d0ed
Got rid of all references to stdwin.
Guido van Rossum <guido@python.org>
parents:
2068
diff
changeset
|
199 FTP site: ftp://ftp.python.org |
|
2838db83d0ed
Got rid of all references to stdwin.
Guido van Rossum <guido@python.org>
parents:
2068
diff
changeset
|
200 .br |
|
2838db83d0ed
Got rid of all references to stdwin.
Guido van Rossum <guido@python.org>
parents:
2068
diff
changeset
|
201 Newsgroup: comp.lang.python |
| 1529 | 202 .SH COPYRIGHT |
|
2068
5227324d64e4
Added 1995 to copyright message; added a few people to acks again...
Guido van Rossum <guido@python.org>
parents:
1656
diff
changeset
|
203 Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, |
|
5227324d64e4
Added 1995 to copyright message; added a few people to acks again...
Guido van Rossum <guido@python.org>
parents:
1656
diff
changeset
|
204 The Netherlands. |
| 1529 | 205 .IP " " |
| 206 All Rights Reserved | |
| 207 .PP | |
|
2068
5227324d64e4
Added 1995 to copyright message; added a few people to acks again...
Guido van Rossum <guido@python.org>
parents:
1656
diff
changeset
|
208 Permission to use, copy, modify, and distribute this software and its |
|
5227324d64e4
Added 1995 to copyright message; added a few people to acks again...
Guido van Rossum <guido@python.org>
parents:
1656
diff
changeset
|
209 documentation for any purpose and without fee is hereby granted, |
| 1529 | 210 provided that the above copyright notice appear in all copies and that |
|
2068
5227324d64e4
Added 1995 to copyright message; added a few people to acks again...
Guido van Rossum <guido@python.org>
parents:
1656
diff
changeset
|
211 both that copyright notice and this permission notice appear in |
| 1529 | 212 supporting documentation, and that the names of Stichting Mathematisch |
|
4503
65d2d8e67da3
New permission notice, includes CNRI.
Guido van Rossum <guido@python.org>
parents:
3875
diff
changeset
|
213 Centrum or CWI or Corporation for National Research Initiatives or |
|
65d2d8e67da3
New permission notice, includes CNRI.
Guido van Rossum <guido@python.org>
parents:
3875
diff
changeset
|
214 CNRI not be used in advertising or publicity pertaining to |
|
65d2d8e67da3
New permission notice, includes CNRI.
Guido van Rossum <guido@python.org>
parents:
3875
diff
changeset
|
215 distribution of the software without specific, written prior |
|
65d2d8e67da3
New permission notice, includes CNRI.
Guido van Rossum <guido@python.org>
parents:
3875
diff
changeset
|
216 permission. |
|
65d2d8e67da3
New permission notice, includes CNRI.
Guido van Rossum <guido@python.org>
parents:
3875
diff
changeset
|
217 |
|
65d2d8e67da3
New permission notice, includes CNRI.
Guido van Rossum <guido@python.org>
parents:
3875
diff
changeset
|
218 While CWI is the initial source for this software, a modified version |
|
65d2d8e67da3
New permission notice, includes CNRI.
Guido van Rossum <guido@python.org>
parents:
3875
diff
changeset
|
219 is made available by the Corporation for National Research Initiatives |
|
65d2d8e67da3
New permission notice, includes CNRI.
Guido van Rossum <guido@python.org>
parents:
3875
diff
changeset
|
220 (CNRI) at the Internet address ftp://ftp.python.org. |
| 1529 | 221 |
|
4503
65d2d8e67da3
New permission notice, includes CNRI.
Guido van Rossum <guido@python.org>
parents:
3875
diff
changeset
|
222 STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH |
|
65d2d8e67da3
New permission notice, includes CNRI.
Guido van Rossum <guido@python.org>
parents:
3875
diff
changeset
|
223 REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF |
|
65d2d8e67da3
New permission notice, includes CNRI.
Guido van Rossum <guido@python.org>
parents:
3875
diff
changeset
|
224 MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH |
|
65d2d8e67da3
New permission notice, includes CNRI.
Guido van Rossum <guido@python.org>
parents:
3875
diff
changeset
|
225 CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL |
|
65d2d8e67da3
New permission notice, includes CNRI.
Guido van Rossum <guido@python.org>
parents:
3875
diff
changeset
|
226 DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR |
|
65d2d8e67da3
New permission notice, includes CNRI.
Guido van Rossum <guido@python.org>
parents:
3875
diff
changeset
|
227 PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER |
|
65d2d8e67da3
New permission notice, includes CNRI.
Guido van Rossum <guido@python.org>
parents:
3875
diff
changeset
|
228 TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR |
|
65d2d8e67da3
New permission notice, includes CNRI.
Guido van Rossum <guido@python.org>
parents:
3875
diff
changeset
|
229 PERFORMANCE OF THIS SOFTWARE. |
