annotate Misc/python.man @ 14602:24fbbf13daa5 legacy-trunk

Describe the -h and -V flags. Closes patch #101496
author Barry Warsaw <barry@python.org>
date Fri, 15 Sep 2000 18:39:09 +0000
parents d1d5e2dc29db
children e57f93ae4fe9
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
14360
d1d5e2dc29db Clean up a bit. Drop -X option, update date, remove documentation
Guido van Rossum <guido@python.org>
parents: 13255
diff changeset
1 .TH PYTHON "1" "5 September, 2000"
1529
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
2 .SH NAME
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
3 python \- an interpreted, interactive, object-oriented programming language
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
4 .SH SYNOPSIS
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
5 .B python
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
6 [
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
7 .B \-d
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
8 ]
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
9 [
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
10 .B \-i
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
11 ]
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
12 [
6273
4333775b55fd Brought up to date with new options and env vars.
Guido van Rossum <guido@python.org>
parents: 5876
diff changeset
13 .B \-O
4333775b55fd Brought up to date with new options and env vars.
Guido van Rossum <guido@python.org>
parents: 5876
diff changeset
14 ]
4333775b55fd Brought up to date with new options and env vars.
Guido van Rossum <guido@python.org>
parents: 5876
diff changeset
15 [
4333775b55fd Brought up to date with new options and env vars.
Guido van Rossum <guido@python.org>
parents: 5876
diff changeset
16 .B \-S
4333775b55fd Brought up to date with new options and env vars.
Guido van Rossum <guido@python.org>
parents: 5876
diff changeset
17 ]
4333775b55fd Brought up to date with new options and env vars.
Guido van Rossum <guido@python.org>
parents: 5876
diff changeset
18 [
7965
e8d0b87c8d6b Document -t flag.
Guido van Rossum <guido@python.org>
parents: 6273
diff changeset
19 .B \-t
e8d0b87c8d6b Document -t flag.
Guido van Rossum <guido@python.org>
parents: 6273
diff changeset
20 ]
e8d0b87c8d6b Document -t flag.
Guido van Rossum <guido@python.org>
parents: 6273
diff changeset
21 [
1601
57b9b77da21b Documented -u (unbuffered), undocumented -k (killprint)
Guido van Rossum <guido@python.org>
parents: 1559
diff changeset
22 .B \-u
1529
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
23 ]
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
24 [
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
25 .B \-v
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
26 ]
14360
d1d5e2dc29db Clean up a bit. Drop -X option, update date, remove documentation
Guido van Rossum <guido@python.org>
parents: 13255
diff changeset
27 [
7968
2ef6e0424179 Document -x too.
Guido van Rossum <guido@python.org>
parents: 7965
diff changeset
28 .B \-x
2ef6e0424179 Document -x too.
Guido van Rossum <guido@python.org>
parents: 7965
diff changeset
29 ]
14602
24fbbf13daa5 Describe the -h and -V flags. Closes patch #101496
Barry Warsaw <barry@python.org>
parents: 14360
diff changeset
30 [
24fbbf13daa5 Describe the -h and -V flags. Closes patch #101496
Barry Warsaw <barry@python.org>
parents: 14360
diff changeset
31 .B \-h
24fbbf13daa5 Describe the -h and -V flags. Closes patch #101496
Barry Warsaw <barry@python.org>
parents: 14360
diff changeset
32 ]
24fbbf13daa5 Describe the -h and -V flags. Closes patch #101496
Barry Warsaw <barry@python.org>
parents: 14360
diff changeset
33 [
24fbbf13daa5 Describe the -h and -V flags. Closes patch #101496
Barry Warsaw <barry@python.org>
parents: 14360
diff changeset
34 .B \-V
24fbbf13daa5 Describe the -h and -V flags. Closes patch #101496
Barry Warsaw <barry@python.org>
parents: 14360
diff changeset
35 ]
6273
4333775b55fd Brought up to date with new options and env vars.
Guido van Rossum <guido@python.org>
parents: 5876
diff changeset
36 .br
4333775b55fd Brought up to date with new options and env vars.
Guido van Rossum <guido@python.org>
parents: 5876
diff changeset
37 [
1529
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
38 .B \-c
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
39 .I command
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
40 |
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
41 .I script
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
42 |
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
43 \-
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
44 ]
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
45 [
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
46 .I arguments
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
47 ]
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
48 .SH DESCRIPTION
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
49 Python is an interpreted, interactive, object-oriented programming
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
50 language that combines remarkable power with very clear syntax.
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
51 For an introduction to programming in Python you are referred to the
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
52 Python Tutorial.
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
53 The Python Library Reference documents built-in and standard types,
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
54 constants, functions and modules.
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
55 Finally, the Python Reference Manual describes the syntax and
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
56 semantics of the core language in (perhaps too) much detail.
14360
d1d5e2dc29db Clean up a bit. Drop -X option, update date, remove documentation
Guido van Rossum <guido@python.org>
parents: 13255
diff changeset
57 (These documents may be located via the
d1d5e2dc29db Clean up a bit. Drop -X option, update date, remove documentation
Guido van Rossum <guido@python.org>
parents: 13255
diff changeset
58 .B "INTERNET RESOURCES"
11214
96501cc3a663 Various updates, mostly to add information to the SEE ALSO and
Fred Drake <fdrake@acm.org>
parents: 7968
diff changeset
59 below; they may be installed on your system as well.)
1529
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
60 .PP
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
61 Python's basic power can be extended with your own modules written in
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
62 C or C++.
3875
2838db83d0ed Got rid of all references to stdwin.
Guido van Rossum <guido@python.org>
parents: 2068
diff changeset
63 On most systems such modules may be dynamically loaded.
1529
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
64 Python is also adaptable as an extension language for existing
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
65 applications.
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
66 See the internal documentation for hints.
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
67 .SH COMMAND LINE OPTIONS
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
68 .TP
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
69 .B \-d
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
70 Turn on parser debugging output (for wizards only, depending on
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
71 compilation options).
1559
df0fb788c0c1 Fix weird messed up paragraphs
Guido van Rossum <guido@python.org>
parents: 1529
diff changeset
72 .TP
1529
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
73 .B \-i
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
74 When a script is passed as first argument or the \fB\-c\fP option is
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
75 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
76 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
77 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
78 raises an exception.
1529
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
79 .TP
6273
4333775b55fd Brought up to date with new options and env vars.
Guido van Rossum <guido@python.org>
parents: 5876
diff changeset
80 .B \-O
4333775b55fd Brought up to date with new options and env vars.
Guido van Rossum <guido@python.org>
parents: 5876
diff changeset
81 Turn on basic optimizations. This changes the filename extension for
4333775b55fd Brought up to date with new options and env vars.
Guido van Rossum <guido@python.org>
parents: 5876
diff changeset
82 compiled (bytecode) files from
4333775b55fd Brought up to date with new options and env vars.
Guido van Rossum <guido@python.org>
parents: 5876
diff changeset
83 .I .pyc
11214
96501cc3a663 Various updates, mostly to add information to the SEE ALSO and
Fred Drake <fdrake@acm.org>
parents: 7968
diff changeset
84 to \fI.pyo\fP. Given twice, causes docstrings to be discarded.
6273
4333775b55fd Brought up to date with new options and env vars.
Guido van Rossum <guido@python.org>
parents: 5876
diff changeset
85 .TP
4333775b55fd Brought up to date with new options and env vars.
Guido van Rossum <guido@python.org>
parents: 5876
diff changeset
86 .B \-S
4333775b55fd Brought up to date with new options and env vars.
Guido van Rossum <guido@python.org>
parents: 5876
diff changeset
87 Disable the import of the module
4333775b55fd Brought up to date with new options and env vars.
Guido van Rossum <guido@python.org>
parents: 5876
diff changeset
88 .I site
4333775b55fd Brought up to date with new options and env vars.
Guido van Rossum <guido@python.org>
parents: 5876
diff changeset
89 and the site-dependent manipulations of
4333775b55fd Brought up to date with new options and env vars.
Guido van Rossum <guido@python.org>
parents: 5876
diff changeset
90 .I sys.path
4333775b55fd Brought up to date with new options and env vars.
Guido van Rossum <guido@python.org>
parents: 5876
diff changeset
91 that it entails.
4333775b55fd Brought up to date with new options and env vars.
Guido van Rossum <guido@python.org>
parents: 5876
diff changeset
92 .TP
7965
e8d0b87c8d6b Document -t flag.
Guido van Rossum <guido@python.org>
parents: 6273
diff changeset
93 .B \-t
e8d0b87c8d6b Document -t flag.
Guido van Rossum <guido@python.org>
parents: 6273
diff changeset
94 Issue a warning when a source file mixes tabs and spaces for
e8d0b87c8d6b Document -t flag.
Guido van Rossum <guido@python.org>
parents: 6273
diff changeset
95 indentation in a way that makes it depend on the worth of a tab
e8d0b87c8d6b Document -t flag.
Guido van Rossum <guido@python.org>
parents: 6273
diff changeset
96 expressed in spaces. Issue an error when the option is given twice.
e8d0b87c8d6b Document -t flag.
Guido van Rossum <guido@python.org>
parents: 6273
diff changeset
97 .TP
1601
57b9b77da21b Documented -u (unbuffered), undocumented -k (killprint)
Guido van Rossum <guido@python.org>
parents: 1559
diff changeset
98 .B \-u
6273
4333775b55fd Brought up to date with new options and env vars.
Guido van Rossum <guido@python.org>
parents: 5876
diff changeset
99 Force stdin, stdout and stderr to be totally unbuffered.
1529
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
100 .TP
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
101 .B \-v
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
102 Print a message each time a module is initialized, showing the place
11214
96501cc3a663 Various updates, mostly to add information to the SEE ALSO and
Fred Drake <fdrake@acm.org>
parents: 7968
diff changeset
103 (filename or built-in module) from which it is loaded. When given
96501cc3a663 Various updates, mostly to add information to the SEE ALSO and
Fred Drake <fdrake@acm.org>
parents: 7968
diff changeset
104 twice, print a message for each file that is checked for when
96501cc3a663 Various updates, mostly to add information to the SEE ALSO and
Fred Drake <fdrake@acm.org>
parents: 7968
diff changeset
105 searching for a module. Also provides information on module cleanup
96501cc3a663 Various updates, mostly to add information to the SEE ALSO and
Fred Drake <fdrake@acm.org>
parents: 7968
diff changeset
106 at exit.
1529
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
107 .TP
7968
2ef6e0424179 Document -x too.
Guido van Rossum <guido@python.org>
parents: 7965
diff changeset
108 .B \-x
2ef6e0424179 Document -x too.
Guido van Rossum <guido@python.org>
parents: 7965
diff changeset
109 Skip the first line of the source. This is intended for a DOS
2ef6e0424179 Document -x too.
Guido van Rossum <guido@python.org>
parents: 7965
diff changeset
110 specific hack only. Warning: the line numbers in error messages will
2ef6e0424179 Document -x too.
Guido van Rossum <guido@python.org>
parents: 7965
diff changeset
111 be off by one!
2ef6e0424179 Document -x too.
Guido van Rossum <guido@python.org>
parents: 7965
diff changeset
112 .TP
14602
24fbbf13daa5 Describe the -h and -V flags. Closes patch #101496
Barry Warsaw <barry@python.org>
parents: 14360
diff changeset
113 .B \-h
24fbbf13daa5 Describe the -h and -V flags. Closes patch #101496
Barry Warsaw <barry@python.org>
parents: 14360
diff changeset
114 Prints the usage for the interpreter executable and exits.
24fbbf13daa5 Describe the -h and -V flags. Closes patch #101496
Barry Warsaw <barry@python.org>
parents: 14360
diff changeset
115 .TP
24fbbf13daa5 Describe the -h and -V flags. Closes patch #101496
Barry Warsaw <barry@python.org>
parents: 14360
diff changeset
116 .B \-V
24fbbf13daa5 Describe the -h and -V flags. Closes patch #101496
Barry Warsaw <barry@python.org>
parents: 14360
diff changeset
117 Prints the Python version number of the executable and exits.
24fbbf13daa5 Describe the -h and -V flags. Closes patch #101496
Barry Warsaw <barry@python.org>
parents: 14360
diff changeset
118 .TP
1529
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
119 .BI "\-c " command
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
120 Specify the command to execute (see next section).
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
121 This terminates the option list (following options are passed as
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
122 arguments to the command).
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
123 .SH INTERPRETER INTERFACE
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
124 The interpreter interface resembles that of the UNIX shell: when
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
125 called with standard input connected to a tty device, it prompts for
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
126 commands and executes them until an EOF is read; when called with a
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
127 file name argument or with a file as standard input, it reads and
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
128 executes a
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
129 .I script
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
130 from that file;
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
131 when called with
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
132 .B \-c
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
133 .I command,
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
134 it executes the Python statement(s) given as
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
135 .I command.
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
136 Here
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
137 .I command
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
138 may contain multiple statements separated by newlines.
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
139 Leading whitespace is significant in Python statements!
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
140 In non-interactive mode, the entire input is parsed befored it is
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
141 executed.
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
142 .PP
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
143 If available, the script name and additional arguments thereafter are
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
144 passed to the script in the Python variable
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
145 .I sys.argv ,
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
146 which is a list of strings (you must first
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
147 .I import sys
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
148 to be able to access it).
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
149 If no script name is given,
14360
d1d5e2dc29db Clean up a bit. Drop -X option, update date, remove documentation
Guido van Rossum <guido@python.org>
parents: 13255
diff changeset
150 .I sys.argv[0]
d1d5e2dc29db Clean up a bit. Drop -X option, update date, remove documentation
Guido van Rossum <guido@python.org>
parents: 13255
diff changeset
151 is an empty string; if
1529
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
152 .B \-c
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
153 is used,
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
154 .I sys.argv[0]
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
155 contains the string
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
156 .I '-c'.
3875
2838db83d0ed Got rid of all references to stdwin.
Guido van Rossum <guido@python.org>
parents: 2068
diff changeset
157 Note that options interpreted by the Python interpreter itself
1529
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
158 are not placed in
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
159 .I sys.argv.
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
160 .PP
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
161 In interactive mode, the primary prompt is `>>>'; the second prompt
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
162 (which appears when a command is not complete) is `...'.
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
163 The prompts can be changed by assignment to
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
164 .I sys.ps1
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
165 or
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
166 .I sys.ps2.
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
167 The interpreter quits when it reads an EOF at a prompt.
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
168 When an unhandled exception occurs, a stack trace is printed and
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
169 control returns to the primary prompt; in non-interactive mode, the
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
170 interpreter exits after printing the stack trace.
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
171 The interrupt signal raises the
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
172 .I Keyboard\%Interrupt
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
173 exception; other UNIX signals are not caught (except that SIGPIPE is
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
174 sometimes ignored, in favor of the
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
175 .I IOError
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
176 exception). Error messages are written to stderr.
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
177 .SH FILES AND DIRECTORIES
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
178 These are subject to difference depending on local installation
11214
96501cc3a663 Various updates, mostly to add information to the SEE ALSO and
Fred Drake <fdrake@acm.org>
parents: 7968
diff changeset
179 conventions; ${prefix} and ${exec_prefix} are installation-dependent
96501cc3a663 Various updates, mostly to add information to the SEE ALSO and
Fred Drake <fdrake@acm.org>
parents: 7968
diff changeset
180 and should be interpreted as for GNU software; they may be the same.
96501cc3a663 Various updates, mostly to add information to the SEE ALSO and
Fred Drake <fdrake@acm.org>
parents: 7968
diff changeset
181 The default for both is \fI/usr/local\fP.
96501cc3a663 Various updates, mostly to add information to the SEE ALSO and
Fred Drake <fdrake@acm.org>
parents: 7968
diff changeset
182 .IP \fI${exec_prefix}/bin/python\fP
1529
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
183 Recommended location of the interpreter.
11214
96501cc3a663 Various updates, mostly to add information to the SEE ALSO and
Fred Drake <fdrake@acm.org>
parents: 7968
diff changeset
184 .PP
96501cc3a663 Various updates, mostly to add information to the SEE ALSO and
Fred Drake <fdrake@acm.org>
parents: 7968
diff changeset
185 .I ${prefix}/lib/python<version>
96501cc3a663 Various updates, mostly to add information to the SEE ALSO and
Fred Drake <fdrake@acm.org>
parents: 7968
diff changeset
186 .br
96501cc3a663 Various updates, mostly to add information to the SEE ALSO and
Fred Drake <fdrake@acm.org>
parents: 7968
diff changeset
187 .I ${exec_prefix}/lib/python<version>
96501cc3a663 Various updates, mostly to add information to the SEE ALSO and
Fred Drake <fdrake@acm.org>
parents: 7968
diff changeset
188 .RS
96501cc3a663 Various updates, mostly to add information to the SEE ALSO and
Fred Drake <fdrake@acm.org>
parents: 7968
diff changeset
189 Recommended locations of the directories containing the standard
96501cc3a663 Various updates, mostly to add information to the SEE ALSO and
Fred Drake <fdrake@acm.org>
parents: 7968
diff changeset
190 modules.
96501cc3a663 Various updates, mostly to add information to the SEE ALSO and
Fred Drake <fdrake@acm.org>
parents: 7968
diff changeset
191 .RE
96501cc3a663 Various updates, mostly to add information to the SEE ALSO and
Fred Drake <fdrake@acm.org>
parents: 7968
diff changeset
192 .PP
96501cc3a663 Various updates, mostly to add information to the SEE ALSO and
Fred Drake <fdrake@acm.org>
parents: 7968
diff changeset
193 .I ${prefix}/include/python<version>
96501cc3a663 Various updates, mostly to add information to the SEE ALSO and
Fred Drake <fdrake@acm.org>
parents: 7968
diff changeset
194 .br
96501cc3a663 Various updates, mostly to add information to the SEE ALSO and
Fred Drake <fdrake@acm.org>
parents: 7968
diff changeset
195 .I ${exec_prefix}/include/python<version>
96501cc3a663 Various updates, mostly to add information to the SEE ALSO and
Fred Drake <fdrake@acm.org>
parents: 7968
diff changeset
196 .RS
96501cc3a663 Various updates, mostly to add information to the SEE ALSO and
Fred Drake <fdrake@acm.org>
parents: 7968
diff changeset
197 Recommended locations of the directories containing the include files
96501cc3a663 Various updates, mostly to add information to the SEE ALSO and
Fred Drake <fdrake@acm.org>
parents: 7968
diff changeset
198 needed for developing Python extensions and embedding the
96501cc3a663 Various updates, mostly to add information to the SEE ALSO and
Fred Drake <fdrake@acm.org>
parents: 7968
diff changeset
199 interpreter.
96501cc3a663 Various updates, mostly to add information to the SEE ALSO and
Fred Drake <fdrake@acm.org>
parents: 7968
diff changeset
200 .RE
96501cc3a663 Various updates, mostly to add information to the SEE ALSO and
Fred Drake <fdrake@acm.org>
parents: 7968
diff changeset
201 .IP \fI~/.pythonrc.py\fP
96501cc3a663 Various updates, mostly to add information to the SEE ALSO and
Fred Drake <fdrake@acm.org>
parents: 7968
diff changeset
202 User-specific initialization file loaded by the \fIuser\fP module;
96501cc3a663 Various updates, mostly to add information to the SEE ALSO and
Fred Drake <fdrake@acm.org>
parents: 7968
diff changeset
203 not used by default or by most applications.
1529
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
204 .SH ENVIRONMENT VARIABLES
6273
4333775b55fd Brought up to date with new options and env vars.
Guido van Rossum <guido@python.org>
parents: 5876
diff changeset
205 .IP PYTHONHOME
4333775b55fd Brought up to date with new options and env vars.
Guido van Rossum <guido@python.org>
parents: 5876
diff changeset
206 Change the location of the standard Python libraries. By default, the
11214
96501cc3a663 Various updates, mostly to add information to the SEE ALSO and
Fred Drake <fdrake@acm.org>
parents: 7968
diff changeset
207 libraries are searched in ${prefix}/lib/python<version> and
96501cc3a663 Various updates, mostly to add information to the SEE ALSO and
Fred Drake <fdrake@acm.org>
parents: 7968
diff changeset
208 ${exec_prefix}/lib/python<version>, where ${prefix} and ${exec_prefix}
6273
4333775b55fd Brought up to date with new options and env vars.
Guido van Rossum <guido@python.org>
parents: 5876
diff changeset
209 are installation-dependent directories, both defaulting to
11214
96501cc3a663 Various updates, mostly to add information to the SEE ALSO and
Fred Drake <fdrake@acm.org>
parents: 7968
diff changeset
210 \fI/usr/local\fP. When $PYTHONHOME is set to a single directory, its value
96501cc3a663 Various updates, mostly to add information to the SEE ALSO and
Fred Drake <fdrake@acm.org>
parents: 7968
diff changeset
211 replaces both ${prefix} and ${exec_prefix}. To specify different values
96501cc3a663 Various updates, mostly to add information to the SEE ALSO and
Fred Drake <fdrake@acm.org>
parents: 7968
diff changeset
212 for these, set $PYTHONHOME to ${prefix}:${exec_prefix}.
1529
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
213 .IP PYTHONPATH
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
214 Augments the default search path for module files.
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
215 The format is the same as the shell's $PATH: one or more directory
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
216 pathnames separated by colons.
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
217 Non-existant directories are silently ignored.
6273
4333775b55fd Brought up to date with new options and env vars.
Guido van Rossum <guido@python.org>
parents: 5876
diff changeset
218 The default search path is installation dependent, but generally
11214
96501cc3a663 Various updates, mostly to add information to the SEE ALSO and
Fred Drake <fdrake@acm.org>
parents: 7968
diff changeset
219 begins with ${prefix}/lib/python<version> (see PYTHONHOME above).
6273
4333775b55fd Brought up to date with new options and env vars.
Guido van Rossum <guido@python.org>
parents: 5876
diff changeset
220 The default search path is always appended to $PYTHONPATH.
3875
2838db83d0ed Got rid of all references to stdwin.
Guido van Rossum <guido@python.org>
parents: 2068
diff changeset
221 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
222 inserted in the path in front of $PYTHONPATH.
1529
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
223 The search path can be manipulated from within a Python program as the
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
224 variable
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
225 .I sys.path .
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
226 .IP PYTHONSTARTUP
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
227 If this is the name of a readable file, the Python commands in that
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
228 file are executed before the first prompt is displayed in interactive
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
229 mode.
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
230 The file is executed in the same name space where interactive commands
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
231 are executed so that objects defined or imported in it can be used
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
232 without qualification in the interactive session.
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
233 You can also change the prompts
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
234 .I sys.ps1
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
235 and
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
236 .I sys.ps2
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
237 in this file.
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
238 .IP PYTHONDEBUG
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
239 If this is set to a non-empty string it is equivalent to specifying
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
240 the \fB\-d\fP option.
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
241 .IP PYTHONINSPECT
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
242 If this is set to a non-empty string it is equivalent to specifying
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
243 the \fB\-i\fP option.
1601
57b9b77da21b Documented -u (unbuffered), undocumented -k (killprint)
Guido van Rossum <guido@python.org>
parents: 1559
diff changeset
244 .IP PYTHONUNBUFFERED
1529
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
245 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
246 the \fB\-u\fP option.
1529
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
247 .IP PYTHONVERBOSE
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
248 If this is set to a non-empty string it is equivalent to specifying
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
249 the \fB\-v\fP option.
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
250 .SH AUTHOR
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
251 .nf
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
252 Guido van Rossum
14360
d1d5e2dc29db Clean up a bit. Drop -X option, update date, remove documentation
Guido van Rossum <guido@python.org>
parents: 13255
diff changeset
253 BeOpen.com
d1d5e2dc29db Clean up a bit. Drop -X option, update date, remove documentation
Guido van Rossum <guido@python.org>
parents: 13255
diff changeset
254 160 Saratoga Avenue
d1d5e2dc29db Clean up a bit. Drop -X option, update date, remove documentation
Guido van Rossum <guido@python.org>
parents: 13255
diff changeset
255 Santa Clara, CA 95051
3875
2838db83d0ed Got rid of all references to stdwin.
Guido van Rossum <guido@python.org>
parents: 2068
diff changeset
256 USA
1529
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
257 .PP
14360
d1d5e2dc29db Clean up a bit. Drop -X option, update date, remove documentation
Guido van Rossum <guido@python.org>
parents: 13255
diff changeset
258 E-mail: guido@beopen.com, guido@python.org
1529
c9b3f77e18ba Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
259 .fi
6273
4333775b55fd Brought up to date with new options and env vars.
Guido van Rossum <guido@python.org>
parents: 5876
diff changeset
260 .PP
4333775b55fd Brought up to date with new options and env vars.
Guido van Rossum <guido@python.org>
parents: 5876
diff changeset
261 And a cast of thousands.
3875
2838db83d0ed Got rid of all references to stdwin.
Guido van Rossum <guido@python.org>
parents: 2068
diff changeset
262 .SH INTERNET RESOURCES
14360
d1d5e2dc29db Clean up a bit. Drop -X option, update date, remove documentation
Guido van Rossum <guido@python.org>
parents: 13255
diff changeset
263 Main website: http://www.python.org
d1d5e2dc29db Clean up a bit. Drop -X option, update date, remove documentation
Guido van Rossum <guido@python.org>
parents: 13255
diff changeset
264 .br
d1d5e2dc29db Clean up a bit. Drop -X option, update date, remove documentation
Guido van Rossum <guido@python.org>
parents: 13255
diff changeset
265 BeOpen development team: http://pythonlabs.com
d1d5e2dc29db Clean up a bit. Drop -X option, update date, remove documentation
Guido van Rossum <guido@python.org>
parents: 13255
diff changeset
266 .br
d1d5e2dc29db Clean up a bit. Drop -X option, update date, remove documentation
Guido van Rossum <guido@python.org>
parents: 13255
diff changeset
267 Community website: http://starship.python.net
3875
2838db83d0ed Got rid of all references to stdwin.
Guido van Rossum <guido@python.org>
parents: 2068
diff changeset
268 .br
14360
d1d5e2dc29db Clean up a bit. Drop -X option, update date, remove documentation
Guido van Rossum <guido@python.org>
parents: 13255
diff changeset
269 Developer resources:
d1d5e2dc29db Clean up a bit. Drop -X option, update date, remove documentation
Guido van Rossum <guido@python.org>
parents: 13255
diff changeset
270 .br
d1d5e2dc29db Clean up a bit. Drop -X option, update date, remove documentation
Guido van Rossum <guido@python.org>
parents: 13255
diff changeset
271 http://sourceforge.net/project/?group_id=5470
d1d5e2dc29db Clean up a bit. Drop -X option, update date, remove documentation
Guido van Rossum <guido@python.org>
parents: 13255
diff changeset
272 .br
d1d5e2dc29db Clean up a bit. Drop -X option, update date, remove documentation
Guido van Rossum <guido@python.org>
parents: 13255
diff changeset
273 FTP: ftp://ftp.python.org/pub/python
d1d5e2dc29db Clean up a bit. Drop -X option, update date, remove documentation
Guido van Rossum <guido@python.org>
parents: 13255
diff changeset
274 .br
d1d5e2dc29db Clean up a bit. Drop -X option, update date, remove documentation
Guido van Rossum <guido@python.org>
parents: 13255
diff changeset
275 Module repository: http://www.vex.net/parnassus/
3875
2838db83d0ed Got rid of all references to stdwin.
Guido van Rossum <guido@python.org>
parents: 2068
diff changeset
276 .br
11214
96501cc3a663 Various updates, mostly to add information to the SEE ALSO and
Fred Drake <fdrake@acm.org>
parents: 7968
diff changeset
277 Newsgroups: comp.lang.python, comp.lang.python.announce
14360
d1d5e2dc29db Clean up a bit. Drop -X option, update date, remove documentation
Guido van Rossum <guido@python.org>
parents: 13255
diff changeset
278 .SH LICENSING
d1d5e2dc29db Clean up a bit. Drop -X option, update date, remove documentation
Guido van Rossum <guido@python.org>
parents: 13255
diff changeset
279 Python is distributed under an Open Source license. See the file
d1d5e2dc29db Clean up a bit. Drop -X option, update date, remove documentation
Guido van Rossum <guido@python.org>
parents: 13255
diff changeset
280 "LICENSE" in the Python source distribution for information on terms &
d1d5e2dc29db Clean up a bit. Drop -X option, update date, remove documentation
Guido van Rossum <guido@python.org>
parents: 13255
diff changeset
281 conditions for accessing and otherwise using Python and for a
d1d5e2dc29db Clean up a bit. Drop -X option, update date, remove documentation
Guido van Rossum <guido@python.org>
parents: 13255
diff changeset
282 DISCLAIMER OF ALL WARRANTIES.