Mercurial > cpython-lru_cache-weakref
annotate Misc/python.man @ 73785:49d69219fa59 3.2
Fix last remaining references to ex-devguide
| author | Éric Araujo <merwok@netwok.org> |
|---|---|
| date | Tue, 29 Nov 2011 16:36:17 +0100 |
| parents | bbc6129f7861 |
| children | 4a31f6b11e7a 599763461943 |
| rev | line source |
|---|---|
|
19740
8e6e248dfdd8
Change the date field to use $Date$ so it won't be outrageously out of
Guido van Rossum <guido@python.org>
parents:
19739
diff
changeset
|
1 .TH PYTHON "1" "$Date$" |
| 33685 | 2 |
|
52363
daf661d05442
Merged revisions 70518,70521,70590,70594-70595 via svnmerge from
Benjamin Peterson <benjamin@python.org>
parents:
51805
diff
changeset
|
3 .\" To view this file while editing, run it through groff: |
|
daf661d05442
Merged revisions 70518,70521,70590,70594-70595 via svnmerge from
Benjamin Peterson <benjamin@python.org>
parents:
51805
diff
changeset
|
4 .\" groff -Tascii -man python.man | less |
| 33685 | 5 |
| 1529 | 6 .SH NAME |
| 7 python \- an interpreted, interactive, object-oriented programming language | |
| 8 .SH SYNOPSIS | |
| 9 .B python | |
| 10 [ | |
|
58612
ce0d4dc488d2
Merged revisions 77877 via svnmerge from
Matthias Klose <doko@ubuntu.com>
parents:
55927
diff
changeset
|
11 .B \-B |
|
ce0d4dc488d2
Merged revisions 77877 via svnmerge from
Matthias Klose <doko@ubuntu.com>
parents:
55927
diff
changeset
|
12 ] |
|
ce0d4dc488d2
Merged revisions 77877 via svnmerge from
Matthias Klose <doko@ubuntu.com>
parents:
55927
diff
changeset
|
13 [ |
| 1529 | 14 .B \-d |
| 15 ] | |
| 16 [ | |
|
19739
8d2c7436b9d2
Document -Q. Move arguments around to be in strict alphabetical
Guido van Rossum <guido@python.org>
parents:
18844
diff
changeset
|
17 .B \-E |
|
8d2c7436b9d2
Document -Q. Move arguments around to be in strict alphabetical
Guido van Rossum <guido@python.org>
parents:
18844
diff
changeset
|
18 ] |
|
8d2c7436b9d2
Document -Q. Move arguments around to be in strict alphabetical
Guido van Rossum <guido@python.org>
parents:
18844
diff
changeset
|
19 [ |
|
8d2c7436b9d2
Document -Q. Move arguments around to be in strict alphabetical
Guido van Rossum <guido@python.org>
parents:
18844
diff
changeset
|
20 .B \-h |
|
8d2c7436b9d2
Document -Q. Move arguments around to be in strict alphabetical
Guido van Rossum <guido@python.org>
parents:
18844
diff
changeset
|
21 ] |
|
8d2c7436b9d2
Document -Q. Move arguments around to be in strict alphabetical
Guido van Rossum <guido@python.org>
parents:
18844
diff
changeset
|
22 [ |
| 1529 | 23 .B \-i |
| 24 ] | |
| 25 [ | |
| 33682 | 26 .B \-m |
| 27 .I module-name | |
| 28 ] | |
|
66687
f35a6d7e325f
#1772833: add -q command line option.
Georg Brandl <georg@python.org>
parents:
65271
diff
changeset
|
29 [ |
|
f35a6d7e325f
#1772833: add -q command line option.
Georg Brandl <georg@python.org>
parents:
65271
diff
changeset
|
30 .B \-q |
|
f35a6d7e325f
#1772833: add -q command line option.
Georg Brandl <georg@python.org>
parents:
65271
diff
changeset
|
31 ] |
|
58612
ce0d4dc488d2
Merged revisions 77877 via svnmerge from
Matthias Klose <doko@ubuntu.com>
parents:
55927
diff
changeset
|
32 .br |
|
ce0d4dc488d2
Merged revisions 77877 via svnmerge from
Matthias Klose <doko@ubuntu.com>
parents:
55927
diff
changeset
|
33 [ |
|
6273
4333775b55fd
Brought up to date with new options and env vars.
Guido van Rossum <guido@python.org>
parents:
5876
diff
changeset
|
34 .B \-O |
|
4333775b55fd
Brought up to date with new options and env vars.
Guido van Rossum <guido@python.org>
parents:
5876
diff
changeset
|
35 ] |
|
58612
ce0d4dc488d2
Merged revisions 77877 via svnmerge from
Matthias Klose <doko@ubuntu.com>
parents:
55927
diff
changeset
|
36 [ |
|
69733
c57fdce01eb8
#11971: fix man page; it's -OO not -O0
R David Murray <rdmurray@bitdance.com>
parents:
65273
diff
changeset
|
37 .B \-OO |
|
58612
ce0d4dc488d2
Merged revisions 77877 via svnmerge from
Matthias Klose <doko@ubuntu.com>
parents:
55927
diff
changeset
|
38 ] |
|
ce0d4dc488d2
Merged revisions 77877 via svnmerge from
Matthias Klose <doko@ubuntu.com>
parents:
55927
diff
changeset
|
39 [ |
|
19739
8d2c7436b9d2
Document -Q. Move arguments around to be in strict alphabetical
Guido van Rossum <guido@python.org>
parents:
18844
diff
changeset
|
40 .B -Q |
|
8d2c7436b9d2
Document -Q. Move arguments around to be in strict alphabetical
Guido van Rossum <guido@python.org>
parents:
18844
diff
changeset
|
41 .I argument |
|
8d2c7436b9d2
Document -Q. Move arguments around to be in strict alphabetical
Guido van Rossum <guido@python.org>
parents:
18844
diff
changeset
|
42 ] |
|
6273
4333775b55fd
Brought up to date with new options and env vars.
Guido van Rossum <guido@python.org>
parents:
5876
diff
changeset
|
43 [ |
|
58612
ce0d4dc488d2
Merged revisions 77877 via svnmerge from
Matthias Klose <doko@ubuntu.com>
parents:
55927
diff
changeset
|
44 .B \-s |
|
ce0d4dc488d2
Merged revisions 77877 via svnmerge from
Matthias Klose <doko@ubuntu.com>
parents:
55927
diff
changeset
|
45 ] |
|
ce0d4dc488d2
Merged revisions 77877 via svnmerge from
Matthias Klose <doko@ubuntu.com>
parents:
55927
diff
changeset
|
46 [ |
|
6273
4333775b55fd
Brought up to date with new options and env vars.
Guido van Rossum <guido@python.org>
parents:
5876
diff
changeset
|
47 .B \-S |
|
4333775b55fd
Brought up to date with new options and env vars.
Guido van Rossum <guido@python.org>
parents:
5876
diff
changeset
|
48 ] |
|
4333775b55fd
Brought up to date with new options and env vars.
Guido van Rossum <guido@python.org>
parents:
5876
diff
changeset
|
49 [ |
|
1601
57b9b77da21b
Documented -u (unbuffered), undocumented -k (killprint)
Guido van Rossum <guido@python.org>
parents:
1559
diff
changeset
|
50 .B \-u |
| 1529 | 51 ] |
|
19739
8d2c7436b9d2
Document -Q. Move arguments around to be in strict alphabetical
Guido van Rossum <guido@python.org>
parents:
18844
diff
changeset
|
52 .br |
|
8d2c7436b9d2
Document -Q. Move arguments around to be in strict alphabetical
Guido van Rossum <guido@python.org>
parents:
18844
diff
changeset
|
53 [ |
|
8d2c7436b9d2
Document -Q. Move arguments around to be in strict alphabetical
Guido van Rossum <guido@python.org>
parents:
18844
diff
changeset
|
54 .B \-v |
|
14602
24fbbf13daa5
Describe the -h and -V flags. Closes patch #101496
Barry Warsaw <barry@python.org>
parents:
14360
diff
changeset
|
55 ] |
|
24fbbf13daa5
Describe the -h and -V flags. Closes patch #101496
Barry Warsaw <barry@python.org>
parents:
14360
diff
changeset
|
56 [ |
|
24fbbf13daa5
Describe the -h and -V flags. Closes patch #101496
Barry Warsaw <barry@python.org>
parents:
14360
diff
changeset
|
57 .B \-V |
|
24fbbf13daa5
Describe the -h and -V flags. Closes patch #101496
Barry Warsaw <barry@python.org>
parents:
14360
diff
changeset
|
58 ] |
|
15612
e57f93ae4fe9
Document the -W option as best as I can.
Guido van Rossum <guido@python.org>
parents:
14602
diff
changeset
|
59 [ |
|
e57f93ae4fe9
Document the -W option as best as I can.
Guido van Rossum <guido@python.org>
parents:
14602
diff
changeset
|
60 .B \-W |
|
e57f93ae4fe9
Document the -W option as best as I can.
Guido van Rossum <guido@python.org>
parents:
14602
diff
changeset
|
61 .I argument |
|
e57f93ae4fe9
Document the -W option as best as I can.
Guido van Rossum <guido@python.org>
parents:
14602
diff
changeset
|
62 ] |
|
19739
8d2c7436b9d2
Document -Q. Move arguments around to be in strict alphabetical
Guido van Rossum <guido@python.org>
parents:
18844
diff
changeset
|
63 [ |
|
8d2c7436b9d2
Document -Q. Move arguments around to be in strict alphabetical
Guido van Rossum <guido@python.org>
parents:
18844
diff
changeset
|
64 .B \-x |
|
8d2c7436b9d2
Document -Q. Move arguments around to be in strict alphabetical
Guido van Rossum <guido@python.org>
parents:
18844
diff
changeset
|
65 ] |
|
58612
ce0d4dc488d2
Merged revisions 77877 via svnmerge from
Matthias Klose <doko@ubuntu.com>
parents:
55927
diff
changeset
|
66 [ |
|
ce0d4dc488d2
Merged revisions 77877 via svnmerge from
Matthias Klose <doko@ubuntu.com>
parents:
55927
diff
changeset
|
67 .B \-? |
|
ce0d4dc488d2
Merged revisions 77877 via svnmerge from
Matthias Klose <doko@ubuntu.com>
parents:
55927
diff
changeset
|
68 ] |
|
6273
4333775b55fd
Brought up to date with new options and env vars.
Guido van Rossum <guido@python.org>
parents:
5876
diff
changeset
|
69 .br |
|
4333775b55fd
Brought up to date with new options and env vars.
Guido van Rossum <guido@python.org>
parents:
5876
diff
changeset
|
70 [ |
| 1529 | 71 .B \-c |
| 72 .I command | |
| 73 | | |
| 74 .I script | |
| 75 | | |
| 76 \- | |
| 77 ] | |
| 78 [ | |
| 79 .I arguments | |
| 80 ] | |
| 81 .SH DESCRIPTION | |
| 82 Python is an interpreted, interactive, object-oriented programming | |
| 83 language that combines remarkable power with very clear syntax. | |
| 84 For an introduction to programming in Python you are referred to the | |
| 85 Python Tutorial. | |
| 86 The Python Library Reference documents built-in and standard types, | |
| 87 constants, functions and modules. | |
| 88 Finally, the Python Reference Manual describes the syntax and | |
| 89 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
|
90 (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
|
91 .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
|
92 below; they may be installed on your system as well.) |
| 1529 | 93 .PP |
| 94 Python's basic power can be extended with your own modules written in | |
| 95 C or C++. | |
|
3875
2838db83d0ed
Got rid of all references to stdwin.
Guido van Rossum <guido@python.org>
parents:
2068
diff
changeset
|
96 On most systems such modules may be dynamically loaded. |
| 1529 | 97 Python is also adaptable as an extension language for existing |
| 98 applications. | |
| 99 See the internal documentation for hints. | |
|
17315
6be8bb4808e1
Mention pydoc in the man page
Andrew M. Kuchling <amk@amk.ca>
parents:
15612
diff
changeset
|
100 .PP |
|
6be8bb4808e1
Mention pydoc in the man page
Andrew M. Kuchling <amk@amk.ca>
parents:
15612
diff
changeset
|
101 Documentation for installed Python modules and packages can be |
|
6be8bb4808e1
Mention pydoc in the man page
Andrew M. Kuchling <amk@amk.ca>
parents:
15612
diff
changeset
|
102 viewed by running the |
|
6be8bb4808e1
Mention pydoc in the man page
Andrew M. Kuchling <amk@amk.ca>
parents:
15612
diff
changeset
|
103 .B pydoc |
|
6be8bb4808e1
Mention pydoc in the man page
Andrew M. Kuchling <amk@amk.ca>
parents:
15612
diff
changeset
|
104 program. |
| 1529 | 105 .SH COMMAND LINE OPTIONS |
| 106 .TP | |
|
58612
ce0d4dc488d2
Merged revisions 77877 via svnmerge from
Matthias Klose <doko@ubuntu.com>
parents:
55927
diff
changeset
|
107 .B \-B |
|
ce0d4dc488d2
Merged revisions 77877 via svnmerge from
Matthias Klose <doko@ubuntu.com>
parents:
55927
diff
changeset
|
108 Don't write |
|
ce0d4dc488d2
Merged revisions 77877 via svnmerge from
Matthias Klose <doko@ubuntu.com>
parents:
55927
diff
changeset
|
109 .I .py[co] |
|
ce0d4dc488d2
Merged revisions 77877 via svnmerge from
Matthias Klose <doko@ubuntu.com>
parents:
55927
diff
changeset
|
110 files on import. See also PYTHONDONTWRITEBYTECODE. |
|
ce0d4dc488d2
Merged revisions 77877 via svnmerge from
Matthias Klose <doko@ubuntu.com>
parents:
55927
diff
changeset
|
111 .TP |
|
19739
8d2c7436b9d2
Document -Q. Move arguments around to be in strict alphabetical
Guido van Rossum <guido@python.org>
parents:
18844
diff
changeset
|
112 .BI "\-c " command |
|
8d2c7436b9d2
Document -Q. Move arguments around to be in strict alphabetical
Guido van Rossum <guido@python.org>
parents:
18844
diff
changeset
|
113 Specify the command to execute (see next section). |
|
8d2c7436b9d2
Document -Q. Move arguments around to be in strict alphabetical
Guido van Rossum <guido@python.org>
parents:
18844
diff
changeset
|
114 This terminates the option list (following options are passed as |
|
8d2c7436b9d2
Document -Q. Move arguments around to be in strict alphabetical
Guido van Rossum <guido@python.org>
parents:
18844
diff
changeset
|
115 arguments to the command). |
|
8d2c7436b9d2
Document -Q. Move arguments around to be in strict alphabetical
Guido van Rossum <guido@python.org>
parents:
18844
diff
changeset
|
116 .TP |
| 1529 | 117 .B \-d |
| 118 Turn on parser debugging output (for wizards only, depending on | |
| 119 compilation options). | |
|
1559
df0fb788c0c1
Fix weird messed up paragraphs
Guido van Rossum <guido@python.org>
parents:
1529
diff
changeset
|
120 .TP |
|
19739
8d2c7436b9d2
Document -Q. Move arguments around to be in strict alphabetical
Guido van Rossum <guido@python.org>
parents:
18844
diff
changeset
|
121 .B \-E |
|
8d2c7436b9d2
Document -Q. Move arguments around to be in strict alphabetical
Guido van Rossum <guido@python.org>
parents:
18844
diff
changeset
|
122 Ignore environment variables like PYTHONPATH and PYTHONHOME that modify |
|
8d2c7436b9d2
Document -Q. Move arguments around to be in strict alphabetical
Guido van Rossum <guido@python.org>
parents:
18844
diff
changeset
|
123 the behavior of the interpreter. |
|
8d2c7436b9d2
Document -Q. Move arguments around to be in strict alphabetical
Guido van Rossum <guido@python.org>
parents:
18844
diff
changeset
|
124 .TP |
|
58612
ce0d4dc488d2
Merged revisions 77877 via svnmerge from
Matthias Klose <doko@ubuntu.com>
parents:
55927
diff
changeset
|
125 .B \-h ", " \-? ", "\-\-help |
|
19739
8d2c7436b9d2
Document -Q. Move arguments around to be in strict alphabetical
Guido van Rossum <guido@python.org>
parents:
18844
diff
changeset
|
126 Prints the usage for the interpreter executable and exits. |
|
8d2c7436b9d2
Document -Q. Move arguments around to be in strict alphabetical
Guido van Rossum <guido@python.org>
parents:
18844
diff
changeset
|
127 .TP |
| 1529 | 128 .B \-i |
| 129 When a script is passed as first argument or the \fB\-c\fP option is | |
| 130 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
|
131 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
|
132 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
|
133 raises an exception. |
| 1529 | 134 .TP |
| 33682 | 135 .BI "\-m " module-name |
| 136 Searches | |
| 137 .I sys.path | |
| 138 for the named module and runs the corresponding | |
| 139 .I .py | |
| 140 file as a script. | |
| 141 .TP | |
|
6273
4333775b55fd
Brought up to date with new options and env vars.
Guido van Rossum <guido@python.org>
parents:
5876
diff
changeset
|
142 .B \-O |
|
4333775b55fd
Brought up to date with new options and env vars.
Guido van Rossum <guido@python.org>
parents:
5876
diff
changeset
|
143 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
|
144 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
|
145 .I .pyc |
|
11214
96501cc3a663
Various updates, mostly to add information to the SEE ALSO and
Fred Drake <fdrake@acm.org>
parents:
7968
diff
changeset
|
146 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
|
147 .TP |
|
69733
c57fdce01eb8
#11971: fix man page; it's -OO not -O0
R David Murray <rdmurray@bitdance.com>
parents:
65273
diff
changeset
|
148 .B \-OO |
|
58612
ce0d4dc488d2
Merged revisions 77877 via svnmerge from
Matthias Klose <doko@ubuntu.com>
parents:
55927
diff
changeset
|
149 Discard docstrings in addition to the \fB-O\fP optimizations. |
|
ce0d4dc488d2
Merged revisions 77877 via svnmerge from
Matthias Klose <doko@ubuntu.com>
parents:
55927
diff
changeset
|
150 .TP |
|
66687
f35a6d7e325f
#1772833: add -q command line option.
Georg Brandl <georg@python.org>
parents:
65271
diff
changeset
|
151 .B \-q |
|
f35a6d7e325f
#1772833: add -q command line option.
Georg Brandl <georg@python.org>
parents:
65271
diff
changeset
|
152 Do not print the version and copyright messages. These messages are |
|
f35a6d7e325f
#1772833: add -q command line option.
Georg Brandl <georg@python.org>
parents:
65271
diff
changeset
|
153 also suppressed in non-interactive mode. |
|
f35a6d7e325f
#1772833: add -q command line option.
Georg Brandl <georg@python.org>
parents:
65271
diff
changeset
|
154 .TP |
|
19739
8d2c7436b9d2
Document -Q. Move arguments around to be in strict alphabetical
Guido van Rossum <guido@python.org>
parents:
18844
diff
changeset
|
155 .BI "\-Q " argument |
|
8d2c7436b9d2
Document -Q. Move arguments around to be in strict alphabetical
Guido van Rossum <guido@python.org>
parents:
18844
diff
changeset
|
156 Division control; see PEP 238. The argument must be one of "old" (the |
|
8d2c7436b9d2
Document -Q. Move arguments around to be in strict alphabetical
Guido van Rossum <guido@python.org>
parents:
18844
diff
changeset
|
157 default, int/int and long/long return an int or long), "new" (new |
|
8d2c7436b9d2
Document -Q. Move arguments around to be in strict alphabetical
Guido van Rossum <guido@python.org>
parents:
18844
diff
changeset
|
158 division semantics, i.e. int/int and long/long returns a float), |
|
8d2c7436b9d2
Document -Q. Move arguments around to be in strict alphabetical
Guido van Rossum <guido@python.org>
parents:
18844
diff
changeset
|
159 "warn" (old division semantics with a warning for int/int and |
|
8d2c7436b9d2
Document -Q. Move arguments around to be in strict alphabetical
Guido van Rossum <guido@python.org>
parents:
18844
diff
changeset
|
160 long/long), or "warnall" (old division semantics with a warning for |
|
8d2c7436b9d2
Document -Q. Move arguments around to be in strict alphabetical
Guido van Rossum <guido@python.org>
parents:
18844
diff
changeset
|
161 all use of the division operator). For a use of "warnall", see the |
|
8d2c7436b9d2
Document -Q. Move arguments around to be in strict alphabetical
Guido van Rossum <guido@python.org>
parents:
18844
diff
changeset
|
162 Tools/scripts/fixdiv.py script. |
|
8d2c7436b9d2
Document -Q. Move arguments around to be in strict alphabetical
Guido van Rossum <guido@python.org>
parents:
18844
diff
changeset
|
163 .TP |
|
58612
ce0d4dc488d2
Merged revisions 77877 via svnmerge from
Matthias Klose <doko@ubuntu.com>
parents:
55927
diff
changeset
|
164 .B \-s |
|
ce0d4dc488d2
Merged revisions 77877 via svnmerge from
Matthias Klose <doko@ubuntu.com>
parents:
55927
diff
changeset
|
165 Don't add user site directory to sys.path. |
|
ce0d4dc488d2
Merged revisions 77877 via svnmerge from
Matthias Klose <doko@ubuntu.com>
parents:
55927
diff
changeset
|
166 .TP |
|
6273
4333775b55fd
Brought up to date with new options and env vars.
Guido van Rossum <guido@python.org>
parents:
5876
diff
changeset
|
167 .B \-S |
|
4333775b55fd
Brought up to date with new options and env vars.
Guido van Rossum <guido@python.org>
parents:
5876
diff
changeset
|
168 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
|
169 .I site |
|
4333775b55fd
Brought up to date with new options and env vars.
Guido van Rossum <guido@python.org>
parents:
5876
diff
changeset
|
170 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
|
171 .I sys.path |
|
4333775b55fd
Brought up to date with new options and env vars.
Guido van Rossum <guido@python.org>
parents:
5876
diff
changeset
|
172 that it entails. |
|
4333775b55fd
Brought up to date with new options and env vars.
Guido van Rossum <guido@python.org>
parents:
5876
diff
changeset
|
173 .TP |
|
1601
57b9b77da21b
Documented -u (unbuffered), undocumented -k (killprint)
Guido van Rossum <guido@python.org>
parents:
1559
diff
changeset
|
174 .B \-u |
|
65111
a4c9746cb03c
Merged revisions 78959,79170,79175,79177,79180,79183,79186,79193,79581 via svnmerge from
Georg Brandl <georg@python.org>
parents:
58612
diff
changeset
|
175 Force the binary I/O layers of stdin, stdout and stderr to be unbuffered. |
|
a4c9746cb03c
Merged revisions 78959,79170,79175,79177,79180,79183,79186,79193,79581 via svnmerge from
Georg Brandl <georg@python.org>
parents:
58612
diff
changeset
|
176 The text I/O layer will still be line-buffered. |
|
a4c9746cb03c
Merged revisions 78959,79170,79175,79177,79180,79183,79186,79193,79581 via svnmerge from
Georg Brandl <georg@python.org>
parents:
58612
diff
changeset
|
177 .\" Note that there is internal buffering in readlines() and |
|
a4c9746cb03c
Merged revisions 78959,79170,79175,79177,79180,79183,79186,79193,79581 via svnmerge from
Georg Brandl <georg@python.org>
parents:
58612
diff
changeset
|
178 .\" file-object iterators ("for line in sys.stdin") which is not |
|
a4c9746cb03c
Merged revisions 78959,79170,79175,79177,79180,79183,79186,79193,79581 via svnmerge from
Georg Brandl <georg@python.org>
parents:
58612
diff
changeset
|
179 .\" influenced by this option. To work around this, you will want to use |
|
a4c9746cb03c
Merged revisions 78959,79170,79175,79177,79180,79183,79186,79193,79581 via svnmerge from
Georg Brandl <georg@python.org>
parents:
58612
diff
changeset
|
180 .\" "sys.stdin.readline()" inside a "while 1:" loop. |
| 1529 | 181 .TP |
| 182 .B \-v | |
| 183 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
|
184 (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
|
185 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
|
186 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
|
187 at exit. |
| 1529 | 188 .TP |
|
58612
ce0d4dc488d2
Merged revisions 77877 via svnmerge from
Matthias Klose <doko@ubuntu.com>
parents:
55927
diff
changeset
|
189 .B \-V ", " \-\-version |
|
14602
24fbbf13daa5
Describe the -h and -V flags. Closes patch #101496
Barry Warsaw <barry@python.org>
parents:
14360
diff
changeset
|
190 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
|
191 .TP |
|
15612
e57f93ae4fe9
Document the -W option as best as I can.
Guido van Rossum <guido@python.org>
parents:
14602
diff
changeset
|
192 .BI "\-W " argument |
|
e57f93ae4fe9
Document the -W option as best as I can.
Guido van Rossum <guido@python.org>
parents:
14602
diff
changeset
|
193 Warning control. Python sometimes prints warning message to |
|
e57f93ae4fe9
Document the -W option as best as I can.
Guido van Rossum <guido@python.org>
parents:
14602
diff
changeset
|
194 .IR sys.stderr . |
|
e57f93ae4fe9
Document the -W option as best as I can.
Guido van Rossum <guido@python.org>
parents:
14602
diff
changeset
|
195 A typical warning message has the following form: |
|
e57f93ae4fe9
Document the -W option as best as I can.
Guido van Rossum <guido@python.org>
parents:
14602
diff
changeset
|
196 .IB file ":" line ": " category ": " message. |
|
e57f93ae4fe9
Document the -W option as best as I can.
Guido van Rossum <guido@python.org>
parents:
14602
diff
changeset
|
197 By default, each warning is printed once for each source line where it |
|
e57f93ae4fe9
Document the -W option as best as I can.
Guido van Rossum <guido@python.org>
parents:
14602
diff
changeset
|
198 occurs. This option controls how often warnings are printed. |
|
e57f93ae4fe9
Document the -W option as best as I can.
Guido van Rossum <guido@python.org>
parents:
14602
diff
changeset
|
199 Multiple |
|
e57f93ae4fe9
Document the -W option as best as I can.
Guido van Rossum <guido@python.org>
parents:
14602
diff
changeset
|
200 .B \-W |
|
e57f93ae4fe9
Document the -W option as best as I can.
Guido van Rossum <guido@python.org>
parents:
14602
diff
changeset
|
201 options may be given; when a warning matches more than one |
|
e57f93ae4fe9
Document the -W option as best as I can.
Guido van Rossum <guido@python.org>
parents:
14602
diff
changeset
|
202 option, the action for the last matching option is performed. |
|
e57f93ae4fe9
Document the -W option as best as I can.
Guido van Rossum <guido@python.org>
parents:
14602
diff
changeset
|
203 Invalid |
|
e57f93ae4fe9
Document the -W option as best as I can.
Guido van Rossum <guido@python.org>
parents:
14602
diff
changeset
|
204 .B \-W |
|
e57f93ae4fe9
Document the -W option as best as I can.
Guido van Rossum <guido@python.org>
parents:
14602
diff
changeset
|
205 options are ignored (a warning message is printed about invalid |
|
e57f93ae4fe9
Document the -W option as best as I can.
Guido van Rossum <guido@python.org>
parents:
14602
diff
changeset
|
206 options when the first warning is issued). Warnings can also be |
|
e57f93ae4fe9
Document the -W option as best as I can.
Guido van Rossum <guido@python.org>
parents:
14602
diff
changeset
|
207 controlled from within a Python program using the |
|
e57f93ae4fe9
Document the -W option as best as I can.
Guido van Rossum <guido@python.org>
parents:
14602
diff
changeset
|
208 .I warnings |
|
e57f93ae4fe9
Document the -W option as best as I can.
Guido van Rossum <guido@python.org>
parents:
14602
diff
changeset
|
209 module. |
|
e57f93ae4fe9
Document the -W option as best as I can.
Guido van Rossum <guido@python.org>
parents:
14602
diff
changeset
|
210 |
|
e57f93ae4fe9
Document the -W option as best as I can.
Guido van Rossum <guido@python.org>
parents:
14602
diff
changeset
|
211 The simplest form of |
|
e57f93ae4fe9
Document the -W option as best as I can.
Guido van Rossum <guido@python.org>
parents:
14602
diff
changeset
|
212 .I argument |
|
e57f93ae4fe9
Document the -W option as best as I can.
Guido van Rossum <guido@python.org>
parents:
14602
diff
changeset
|
213 is one of the following |
|
e57f93ae4fe9
Document the -W option as best as I can.
Guido van Rossum <guido@python.org>
parents:
14602
diff
changeset
|
214 .I action |
|
e57f93ae4fe9
Document the -W option as best as I can.
Guido van Rossum <guido@python.org>
parents:
14602
diff
changeset
|
215 strings (or a unique abbreviation): |
|
e57f93ae4fe9
Document the -W option as best as I can.
Guido van Rossum <guido@python.org>
parents:
14602
diff
changeset
|
216 .B ignore |
|
e57f93ae4fe9
Document the -W option as best as I can.
Guido van Rossum <guido@python.org>
parents:
14602
diff
changeset
|
217 to ignore all warnings; |
|
e57f93ae4fe9
Document the -W option as best as I can.
Guido van Rossum <guido@python.org>
parents:
14602
diff
changeset
|
218 .B default |
|
e57f93ae4fe9
Document the -W option as best as I can.
Guido van Rossum <guido@python.org>
parents:
14602
diff
changeset
|
219 to explicitly request the default behavior (printing each warning once |
|
e57f93ae4fe9
Document the -W option as best as I can.
Guido van Rossum <guido@python.org>
parents:
14602
diff
changeset
|
220 per source line); |
|
e57f93ae4fe9
Document the -W option as best as I can.
Guido van Rossum <guido@python.org>
parents:
14602
diff
changeset
|
221 .B all |
|
e57f93ae4fe9
Document the -W option as best as I can.
Guido van Rossum <guido@python.org>
parents:
14602
diff
changeset
|
222 to print a warning each time it occurs (this may generate many |
|
e57f93ae4fe9
Document the -W option as best as I can.
Guido van Rossum <guido@python.org>
parents:
14602
diff
changeset
|
223 messages if a warning is triggered repeatedly for the same source |
|
18844
045f55135ad0
Document the PYTHONY2K environment variable that had been left out of this
Fred Drake <fdrake@acm.org>
parents:
18808
diff
changeset
|
224 line, such as inside a loop); |
|
15612
e57f93ae4fe9
Document the -W option as best as I can.
Guido van Rossum <guido@python.org>
parents:
14602
diff
changeset
|
225 .B module |
|
54841
f6cb2932022c
Merged revisions 73544 via svnmerge from
Georg Brandl <georg@python.org>
parents:
52363
diff
changeset
|
226 to print each warning only the first time it occurs in each |
|
15612
e57f93ae4fe9
Document the -W option as best as I can.
Guido van Rossum <guido@python.org>
parents:
14602
diff
changeset
|
227 module; |
|
e57f93ae4fe9
Document the -W option as best as I can.
Guido van Rossum <guido@python.org>
parents:
14602
diff
changeset
|
228 .B once |
|
e57f93ae4fe9
Document the -W option as best as I can.
Guido van Rossum <guido@python.org>
parents:
14602
diff
changeset
|
229 to print each warning only the first time it occurs in the program; or |
|
e57f93ae4fe9
Document the -W option as best as I can.
Guido van Rossum <guido@python.org>
parents:
14602
diff
changeset
|
230 .B error |
|
e57f93ae4fe9
Document the -W option as best as I can.
Guido van Rossum <guido@python.org>
parents:
14602
diff
changeset
|
231 to raise an exception instead of printing a warning message. |
|
e57f93ae4fe9
Document the -W option as best as I can.
Guido van Rossum <guido@python.org>
parents:
14602
diff
changeset
|
232 |
|
e57f93ae4fe9
Document the -W option as best as I can.
Guido van Rossum <guido@python.org>
parents:
14602
diff
changeset
|
233 The full form of |
|
e57f93ae4fe9
Document the -W option as best as I can.
Guido van Rossum <guido@python.org>
parents:
14602
diff
changeset
|
234 .I argument |
|
e57f93ae4fe9
Document the -W option as best as I can.
Guido van Rossum <guido@python.org>
parents:
14602
diff
changeset
|
235 is |
|
e57f93ae4fe9
Document the -W option as best as I can.
Guido van Rossum <guido@python.org>
parents:
14602
diff
changeset
|
236 .IB action : message : category : module : line. |
|
e57f93ae4fe9
Document the -W option as best as I can.
Guido van Rossum <guido@python.org>
parents:
14602
diff
changeset
|
237 Here, |
|
e57f93ae4fe9
Document the -W option as best as I can.
Guido van Rossum <guido@python.org>
parents:
14602
diff
changeset
|
238 .I action |
|
e57f93ae4fe9
Document the -W option as best as I can.
Guido van Rossum <guido@python.org>
parents:
14602
diff
changeset
|
239 is as explained above but only applies to messages that match the |
|
e57f93ae4fe9
Document the -W option as best as I can.
Guido van Rossum <guido@python.org>
parents:
14602
diff
changeset
|
240 remaining fields. Empty fields match all values; trailing empty |
|
e57f93ae4fe9
Document the -W option as best as I can.
Guido van Rossum <guido@python.org>
parents:
14602
diff
changeset
|
241 fields may be omitted. The |
|
e57f93ae4fe9
Document the -W option as best as I can.
Guido van Rossum <guido@python.org>
parents:
14602
diff
changeset
|
242 .I message |
|
e57f93ae4fe9
Document the -W option as best as I can.
Guido van Rossum <guido@python.org>
parents:
14602
diff
changeset
|
243 field matches the start of the warning message printed; this match is |
|
e57f93ae4fe9
Document the -W option as best as I can.
Guido van Rossum <guido@python.org>
parents:
14602
diff
changeset
|
244 case-insensitive. The |
|
e57f93ae4fe9
Document the -W option as best as I can.
Guido van Rossum <guido@python.org>
parents:
14602
diff
changeset
|
245 .I category |
|
e57f93ae4fe9
Document the -W option as best as I can.
Guido van Rossum <guido@python.org>
parents:
14602
diff
changeset
|
246 field matches the warning category. This must be a class name; the |
|
e57f93ae4fe9
Document the -W option as best as I can.
Guido van Rossum <guido@python.org>
parents:
14602
diff
changeset
|
247 match test whether the actual warning category of the message is a |
|
e57f93ae4fe9
Document the -W option as best as I can.
Guido van Rossum <guido@python.org>
parents:
14602
diff
changeset
|
248 subclass of the specified warning category. The full class name must |
|
e57f93ae4fe9
Document the -W option as best as I can.
Guido van Rossum <guido@python.org>
parents:
14602
diff
changeset
|
249 be given. The |
|
e57f93ae4fe9
Document the -W option as best as I can.
Guido van Rossum <guido@python.org>
parents:
14602
diff
changeset
|
250 .I module |
|
e57f93ae4fe9
Document the -W option as best as I can.
Guido van Rossum <guido@python.org>
parents:
14602
diff
changeset
|
251 field matches the (fully-qualified) module name; this match is |
|
e57f93ae4fe9
Document the -W option as best as I can.
Guido van Rossum <guido@python.org>
parents:
14602
diff
changeset
|
252 case-sensitive. The |
|
e57f93ae4fe9
Document the -W option as best as I can.
Guido van Rossum <guido@python.org>
parents:
14602
diff
changeset
|
253 .I line |
|
e57f93ae4fe9
Document the -W option as best as I can.
Guido van Rossum <guido@python.org>
parents:
14602
diff
changeset
|
254 field matches the line number, where zero matches all line numbers and |
|
e57f93ae4fe9
Document the -W option as best as I can.
Guido van Rossum <guido@python.org>
parents:
14602
diff
changeset
|
255 is thus equivalent to an omitted line number. |
|
e57f93ae4fe9
Document the -W option as best as I can.
Guido van Rossum <guido@python.org>
parents:
14602
diff
changeset
|
256 .TP |
|
19739
8d2c7436b9d2
Document -Q. Move arguments around to be in strict alphabetical
Guido van Rossum <guido@python.org>
parents:
18844
diff
changeset
|
257 .B \-x |
|
8d2c7436b9d2
Document -Q. Move arguments around to be in strict alphabetical
Guido van Rossum <guido@python.org>
parents:
18844
diff
changeset
|
258 Skip the first line of the source. This is intended for a DOS |
|
8d2c7436b9d2
Document -Q. Move arguments around to be in strict alphabetical
Guido van Rossum <guido@python.org>
parents:
18844
diff
changeset
|
259 specific hack only. Warning: the line numbers in error messages will |
|
8d2c7436b9d2
Document -Q. Move arguments around to be in strict alphabetical
Guido van Rossum <guido@python.org>
parents:
18844
diff
changeset
|
260 be off by one! |
| 1529 | 261 .SH INTERPRETER INTERFACE |
| 262 The interpreter interface resembles that of the UNIX shell: when | |
| 263 called with standard input connected to a tty device, it prompts for | |
| 264 commands and executes them until an EOF is read; when called with a | |
| 265 file name argument or with a file as standard input, it reads and | |
| 266 executes a | |
| 267 .I script | |
| 268 from that file; | |
| 269 when called with | |
| 270 .B \-c | |
| 271 .I command, | |
| 272 it executes the Python statement(s) given as | |
| 273 .I command. | |
| 274 Here | |
| 275 .I command | |
| 276 may contain multiple statements separated by newlines. | |
| 277 Leading whitespace is significant in Python statements! | |
|
34779
997b255e1ccc
fix two typos in python(1)
Matthias Klose <doko@ubuntu.com>
parents:
33685
diff
changeset
|
278 In non-interactive mode, the entire input is parsed before it is |
| 1529 | 279 executed. |
| 280 .PP | |
| 281 If available, the script name and additional arguments thereafter are | |
| 282 passed to the script in the Python variable | |
| 283 .I sys.argv , | |
| 284 which is a list of strings (you must first | |
| 285 .I import sys | |
| 286 to be able to access it). | |
| 287 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
|
288 .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
|
289 is an empty string; if |
| 1529 | 290 .B \-c |
| 291 is used, | |
| 292 .I sys.argv[0] | |
| 293 contains the string | |
| 294 .I '-c'. | |
|
3875
2838db83d0ed
Got rid of all references to stdwin.
Guido van Rossum <guido@python.org>
parents:
2068
diff
changeset
|
295 Note that options interpreted by the Python interpreter itself |
| 1529 | 296 are not placed in |
| 297 .I sys.argv. | |
| 298 .PP | |
| 299 In interactive mode, the primary prompt is `>>>'; the second prompt | |
| 300 (which appears when a command is not complete) is `...'. | |
| 301 The prompts can be changed by assignment to | |
| 302 .I sys.ps1 | |
| 303 or | |
| 304 .I sys.ps2. | |
| 305 The interpreter quits when it reads an EOF at a prompt. | |
| 306 When an unhandled exception occurs, a stack trace is printed and | |
| 307 control returns to the primary prompt; in non-interactive mode, the | |
| 308 interpreter exits after printing the stack trace. | |
| 309 The interrupt signal raises the | |
| 310 .I Keyboard\%Interrupt | |
| 311 exception; other UNIX signals are not caught (except that SIGPIPE is | |
| 312 sometimes ignored, in favor of the | |
| 313 .I IOError | |
| 314 exception). Error messages are written to stderr. | |
| 315 .SH FILES AND DIRECTORIES | |
| 316 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
|
317 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
|
318 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
|
319 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
|
320 .IP \fI${exec_prefix}/bin/python\fP |
| 1529 | 321 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
|
322 .PP |
|
96501cc3a663
Various updates, mostly to add information to the SEE ALSO and
Fred Drake <fdrake@acm.org>
parents:
7968
diff
changeset
|
323 .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
|
324 .br |
|
96501cc3a663
Various updates, mostly to add information to the SEE ALSO and
Fred Drake <fdrake@acm.org>
parents:
7968
diff
changeset
|
325 .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
|
326 .RS |
|
96501cc3a663
Various updates, mostly to add information to the SEE ALSO and
Fred Drake <fdrake@acm.org>
parents:
7968
diff
changeset
|
327 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
|
328 modules. |
|
96501cc3a663
Various updates, mostly to add information to the SEE ALSO and
Fred Drake <fdrake@acm.org>
parents:
7968
diff
changeset
|
329 .RE |
|
96501cc3a663
Various updates, mostly to add information to the SEE ALSO and
Fred Drake <fdrake@acm.org>
parents:
7968
diff
changeset
|
330 .PP |
|
96501cc3a663
Various updates, mostly to add information to the SEE ALSO and
Fred Drake <fdrake@acm.org>
parents:
7968
diff
changeset
|
331 .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
|
332 .br |
|
96501cc3a663
Various updates, mostly to add information to the SEE ALSO and
Fred Drake <fdrake@acm.org>
parents:
7968
diff
changeset
|
333 .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
|
334 .RS |
|
96501cc3a663
Various updates, mostly to add information to the SEE ALSO and
Fred Drake <fdrake@acm.org>
parents:
7968
diff
changeset
|
335 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
|
336 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
|
337 interpreter. |
|
96501cc3a663
Various updates, mostly to add information to the SEE ALSO and
Fred Drake <fdrake@acm.org>
parents:
7968
diff
changeset
|
338 .RE |
| 1529 | 339 .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
|
340 .IP PYTHONHOME |
|
4333775b55fd
Brought up to date with new options and env vars.
Guido van Rossum <guido@python.org>
parents:
5876
diff
changeset
|
341 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
|
342 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
|
343 ${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
|
344 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
|
345 \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
|
346 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
|
347 for these, set $PYTHONHOME to ${prefix}:${exec_prefix}. |
| 1529 | 348 .IP PYTHONPATH |
| 349 Augments the default search path for module files. | |
| 350 The format is the same as the shell's $PATH: one or more directory | |
| 351 pathnames separated by colons. | |
|
34779
997b255e1ccc
fix two typos in python(1)
Matthias Klose <doko@ubuntu.com>
parents:
33685
diff
changeset
|
352 Non-existent 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
|
353 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
|
354 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
|
355 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
|
356 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
|
357 inserted in the path in front of $PYTHONPATH. |
| 1529 | 358 The search path can be manipulated from within a Python program as the |
| 359 variable | |
| 360 .I sys.path . | |
| 361 .IP PYTHONSTARTUP | |
| 362 If this is the name of a readable file, the Python commands in that | |
| 363 file are executed before the first prompt is displayed in interactive | |
| 364 mode. | |
| 365 The file is executed in the same name space where interactive commands | |
| 366 are executed so that objects defined or imported in it can be used | |
| 367 without qualification in the interactive session. | |
| 368 You can also change the prompts | |
| 369 .I sys.ps1 | |
| 370 and | |
| 371 .I sys.ps2 | |
| 372 in this file. | |
|
18844
045f55135ad0
Document the PYTHONY2K environment variable that had been left out of this
Fred Drake <fdrake@acm.org>
parents:
18808
diff
changeset
|
373 .IP PYTHONY2K |
|
045f55135ad0
Document the PYTHONY2K environment variable that had been left out of this
Fred Drake <fdrake@acm.org>
parents:
18808
diff
changeset
|
374 Set this to a non-empty string to cause the \fItime\fP module to |
|
045f55135ad0
Document the PYTHONY2K environment variable that had been left out of this
Fred Drake <fdrake@acm.org>
parents:
18808
diff
changeset
|
375 require dates specified as strings to include 4-digit years, otherwise |
|
045f55135ad0
Document the PYTHONY2K environment variable that had been left out of this
Fred Drake <fdrake@acm.org>
parents:
18808
diff
changeset
|
376 2-digit years are converted based on rules described in the \fItime\fP |
| 23406 | 377 module documentation. |
|
20401
b74610c92d8b
SF patch #467455 : Enhanced environment variables, by Toby Dickenson.
Guido van Rossum <guido@python.org>
parents:
19740
diff
changeset
|
378 .IP PYTHONOPTIMIZE |
|
b74610c92d8b
SF patch #467455 : Enhanced environment variables, by Toby Dickenson.
Guido van Rossum <guido@python.org>
parents:
19740
diff
changeset
|
379 If this is set to a non-empty string it is equivalent to specifying |
|
b74610c92d8b
SF patch #467455 : Enhanced environment variables, by Toby Dickenson.
Guido van Rossum <guido@python.org>
parents:
19740
diff
changeset
|
380 the \fB\-O\fP option. If set to an integer, it is equivalent to |
|
b74610c92d8b
SF patch #467455 : Enhanced environment variables, by Toby Dickenson.
Guido van Rossum <guido@python.org>
parents:
19740
diff
changeset
|
381 specifying \fB\-O\fP multiple times. |
| 1529 | 382 .IP PYTHONDEBUG |
| 383 If this is set to a non-empty string it is equivalent to specifying | |
|
20401
b74610c92d8b
SF patch #467455 : Enhanced environment variables, by Toby Dickenson.
Guido van Rossum <guido@python.org>
parents:
19740
diff
changeset
|
384 the \fB\-d\fP option. If set to an integer, it is equivalent to |
|
b74610c92d8b
SF patch #467455 : Enhanced environment variables, by Toby Dickenson.
Guido van Rossum <guido@python.org>
parents:
19740
diff
changeset
|
385 specifying \fB\-d\fP multiple times. |
|
58612
ce0d4dc488d2
Merged revisions 77877 via svnmerge from
Matthias Klose <doko@ubuntu.com>
parents:
55927
diff
changeset
|
386 .IP PYTHONDONTWRITEBYTECODE |
|
ce0d4dc488d2
Merged revisions 77877 via svnmerge from
Matthias Klose <doko@ubuntu.com>
parents:
55927
diff
changeset
|
387 If this is set to a non-empty string it is equivalent to specifying |
|
ce0d4dc488d2
Merged revisions 77877 via svnmerge from
Matthias Klose <doko@ubuntu.com>
parents:
55927
diff
changeset
|
388 the \fB\-B\fP option (don't try to write |
|
ce0d4dc488d2
Merged revisions 77877 via svnmerge from
Matthias Klose <doko@ubuntu.com>
parents:
55927
diff
changeset
|
389 .I .py[co] |
|
ce0d4dc488d2
Merged revisions 77877 via svnmerge from
Matthias Klose <doko@ubuntu.com>
parents:
55927
diff
changeset
|
390 files). |
| 1529 | 391 .IP PYTHONINSPECT |
| 392 If this is set to a non-empty string it is equivalent to specifying | |
| 393 the \fB\-i\fP option. | |
|
65273
1f225d66941a
Merged revisions 85436 via svnmerge from
Benjamin Peterson <benjamin@python.org>
parents:
65111
diff
changeset
|
394 .IP PYTHONIOENCODING |
|
1f225d66941a
Merged revisions 85436 via svnmerge from
Benjamin Peterson <benjamin@python.org>
parents:
65111
diff
changeset
|
395 If this is set before running the interpreter, it overrides the encoding used |
|
1f225d66941a
Merged revisions 85436 via svnmerge from
Benjamin Peterson <benjamin@python.org>
parents:
65111
diff
changeset
|
396 for stdin/stdout/stderr, in the syntax |
|
1f225d66941a
Merged revisions 85436 via svnmerge from
Benjamin Peterson <benjamin@python.org>
parents:
65111
diff
changeset
|
397 .IB encodingname ":" errorhandler |
|
1f225d66941a
Merged revisions 85436 via svnmerge from
Benjamin Peterson <benjamin@python.org>
parents:
65111
diff
changeset
|
398 The |
|
1f225d66941a
Merged revisions 85436 via svnmerge from
Benjamin Peterson <benjamin@python.org>
parents:
65111
diff
changeset
|
399 .IB errorhandler |
|
1f225d66941a
Merged revisions 85436 via svnmerge from
Benjamin Peterson <benjamin@python.org>
parents:
65111
diff
changeset
|
400 part is optional and has the same meaning as in str.encode. For stderr, the |
|
1f225d66941a
Merged revisions 85436 via svnmerge from
Benjamin Peterson <benjamin@python.org>
parents:
65111
diff
changeset
|
401 .IB errorhandler |
|
1f225d66941a
Merged revisions 85436 via svnmerge from
Benjamin Peterson <benjamin@python.org>
parents:
65111
diff
changeset
|
402 part is ignored; the handler will always be \'backslashreplace\'. |
|
58612
ce0d4dc488d2
Merged revisions 77877 via svnmerge from
Matthias Klose <doko@ubuntu.com>
parents:
55927
diff
changeset
|
403 .IP PYTHONNOUSERSITE |
|
65273
1f225d66941a
Merged revisions 85436 via svnmerge from
Benjamin Peterson <benjamin@python.org>
parents:
65111
diff
changeset
|
404 If this is set to a non-empty string it is equivalent to specifying the |
|
1f225d66941a
Merged revisions 85436 via svnmerge from
Benjamin Peterson <benjamin@python.org>
parents:
65111
diff
changeset
|
405 \fB\-s\fP option (Don't add the user site directory to sys.path). |
|
1601
57b9b77da21b
Documented -u (unbuffered), undocumented -k (killprint)
Guido van Rossum <guido@python.org>
parents:
1559
diff
changeset
|
406 .IP PYTHONUNBUFFERED |
| 1529 | 407 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
|
408 the \fB\-u\fP option. |
| 1529 | 409 .IP PYTHONVERBOSE |
| 410 If this is set to a non-empty string it is equivalent to specifying | |
|
20401
b74610c92d8b
SF patch #467455 : Enhanced environment variables, by Toby Dickenson.
Guido van Rossum <guido@python.org>
parents:
19740
diff
changeset
|
411 the \fB\-v\fP option. If set to an integer, it is equivalent to |
|
b74610c92d8b
SF patch #467455 : Enhanced environment variables, by Toby Dickenson.
Guido van Rossum <guido@python.org>
parents:
19740
diff
changeset
|
412 specifying \fB\-v\fP multiple times. |
|
60436
f369db0d5845
Merged revisions 79878-79880 via svnmerge from
Philip Jenvey <pjenvey@underboss.org>
parents:
60149
diff
changeset
|
413 .IP PYTHONWARNINGS |
|
f369db0d5845
Merged revisions 79878-79880 via svnmerge from
Philip Jenvey <pjenvey@underboss.org>
parents:
60149
diff
changeset
|
414 If this is set to a comma-separated string it is equivalent to |
|
f369db0d5845
Merged revisions 79878-79880 via svnmerge from
Philip Jenvey <pjenvey@underboss.org>
parents:
60149
diff
changeset
|
415 specifying the \fB\-W\fP option for each separate value. |
| 1529 | 416 .SH AUTHOR |
|
33684
3e6f56e8104a
Take out Guido's name and put in the PSF
Andrew M. Kuchling <amk@amk.ca>
parents:
33683
diff
changeset
|
417 The Python Software Foundation: http://www.python.org/psf |
|
3875
2838db83d0ed
Got rid of all references to stdwin.
Guido van Rossum <guido@python.org>
parents:
2068
diff
changeset
|
418 .SH INTERNET RESOURCES |
|
18844
045f55135ad0
Document the PYTHONY2K environment variable that had been left out of this
Fred Drake <fdrake@acm.org>
parents:
18808
diff
changeset
|
419 Main website: http://www.python.org/ |
|
14360
d1d5e2dc29db
Clean up a bit. Drop -X option, update date, remove documentation
Guido van Rossum <guido@python.org>
parents:
13255
diff
changeset
|
420 .br |
|
55927
8bc4c8cac7d7
Merged revisions 74759-74760 via svnmerge from
Benjamin Peterson <benjamin@python.org>
parents:
54841
diff
changeset
|
421 Documentation: http://docs.python.org/py3k/ |
|
14360
d1d5e2dc29db
Clean up a bit. Drop -X option, update date, remove documentation
Guido van Rossum <guido@python.org>
parents:
13255
diff
changeset
|
422 .br |
|
73785
49d69219fa59
Fix last remaining references to ex-devguide
Éric Araujo <merwok@netwok.org>
parents:
69734
diff
changeset
|
423 Developer resources: http://docs.python.org/devguide/ |
|
14360
d1d5e2dc29db
Clean up a bit. Drop -X option, update date, remove documentation
Guido van Rossum <guido@python.org>
parents:
13255
diff
changeset
|
424 .br |
|
55927
8bc4c8cac7d7
Merged revisions 74759-74760 via svnmerge from
Benjamin Peterson <benjamin@python.org>
parents:
54841
diff
changeset
|
425 Downloads: http://python.org/download/ |
|
14360
d1d5e2dc29db
Clean up a bit. Drop -X option, update date, remove documentation
Guido van Rossum <guido@python.org>
parents:
13255
diff
changeset
|
426 .br |
|
55927
8bc4c8cac7d7
Merged revisions 74759-74760 via svnmerge from
Benjamin Peterson <benjamin@python.org>
parents:
54841
diff
changeset
|
427 Module repository: http://pypi.python.org/ |
|
3875
2838db83d0ed
Got rid of all references to stdwin.
Guido van Rossum <guido@python.org>
parents:
2068
diff
changeset
|
428 .br |
|
18844
045f55135ad0
Document the PYTHONY2K environment variable that had been left out of this
Fred Drake <fdrake@acm.org>
parents:
18808
diff
changeset
|
429 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
|
430 .SH LICENSING |
|
d1d5e2dc29db
Clean up a bit. Drop -X option, update date, remove documentation
Guido van Rossum <guido@python.org>
parents:
13255
diff
changeset
|
431 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
|
432 "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
|
433 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
|
434 DISCLAIMER OF ALL WARRANTIES. |
