Mercurial > cpython-lru_cache-weakref
annotate Misc/python.man @ 65274:e76f554158a8 2.7
Merged revisions 85436 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k
........
r85436 | benjamin.peterson | 2010-10-13 17:20:15 -0500 (Wed, 13 Oct 2010) | 1 line
put PYTHONIOENCODING in man page
........
| author | Benjamin Peterson <benjamin@python.org> |
|---|---|
| date | Wed, 13 Oct 2010 22:25:26 +0000 |
| parents | c9e4e12e9cb6 |
| children | b36cb4602e21 |
| 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 |
|
52263
d1b0bd48ba15
Merged revisions 70518 via svnmerge from
Matthias Klose <doko@ubuntu.com>
parents:
50786
diff
changeset
|
3 .\" To view this file while editing, run it through groff: |
|
d1b0bd48ba15
Merged revisions 70518 via svnmerge from
Matthias Klose <doko@ubuntu.com>
parents:
50786
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 [ | |
|
58609
2ddbe62a6820
- Update python manual page (options -B, -O0, -s, environment variables
Matthias Klose <doko@ubuntu.com>
parents:
55923
diff
changeset
|
11 .B \-B |
|
2ddbe62a6820
- Update python manual page (options -B, -O0, -s, environment variables
Matthias Klose <doko@ubuntu.com>
parents:
55923
diff
changeset
|
12 ] |
|
2ddbe62a6820
- Update python manual page (options -B, -O0, -s, environment variables
Matthias Klose <doko@ubuntu.com>
parents:
55923
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 ] | |
|
58609
2ddbe62a6820
- Update python manual page (options -B, -O0, -s, environment variables
Matthias Klose <doko@ubuntu.com>
parents:
55923
diff
changeset
|
29 .br |
|
2ddbe62a6820
- Update python manual page (options -B, -O0, -s, environment variables
Matthias Klose <doko@ubuntu.com>
parents:
55923
diff
changeset
|
30 [ |
|
6273
4333775b55fd
Brought up to date with new options and env vars.
Guido van Rossum <guido@python.org>
parents:
5876
diff
changeset
|
31 .B \-O |
|
4333775b55fd
Brought up to date with new options and env vars.
Guido van Rossum <guido@python.org>
parents:
5876
diff
changeset
|
32 ] |
|
58609
2ddbe62a6820
- Update python manual page (options -B, -O0, -s, environment variables
Matthias Klose <doko@ubuntu.com>
parents:
55923
diff
changeset
|
33 [ |
|
2ddbe62a6820
- Update python manual page (options -B, -O0, -s, environment variables
Matthias Klose <doko@ubuntu.com>
parents:
55923
diff
changeset
|
34 .B \-O0 |
|
2ddbe62a6820
- Update python manual page (options -B, -O0, -s, environment variables
Matthias Klose <doko@ubuntu.com>
parents:
55923
diff
changeset
|
35 ] |
|
2ddbe62a6820
- Update python manual page (options -B, -O0, -s, environment variables
Matthias Klose <doko@ubuntu.com>
parents:
55923
diff
changeset
|
36 [ |
|
19739
8d2c7436b9d2
Document -Q. Move arguments around to be in strict alphabetical
Guido van Rossum <guido@python.org>
parents:
18844
diff
changeset
|
37 .B -Q |
|
8d2c7436b9d2
Document -Q. Move arguments around to be in strict alphabetical
Guido van Rossum <guido@python.org>
parents:
18844
diff
changeset
|
38 .I argument |
|
8d2c7436b9d2
Document -Q. Move arguments around to be in strict alphabetical
Guido van Rossum <guido@python.org>
parents:
18844
diff
changeset
|
39 ] |
|
6273
4333775b55fd
Brought up to date with new options and env vars.
Guido van Rossum <guido@python.org>
parents:
5876
diff
changeset
|
40 [ |
|
58609
2ddbe62a6820
- Update python manual page (options -B, -O0, -s, environment variables
Matthias Klose <doko@ubuntu.com>
parents:
55923
diff
changeset
|
41 .B \-s |
|
2ddbe62a6820
- Update python manual page (options -B, -O0, -s, environment variables
Matthias Klose <doko@ubuntu.com>
parents:
55923
diff
changeset
|
42 ] |
|
2ddbe62a6820
- Update python manual page (options -B, -O0, -s, environment variables
Matthias Klose <doko@ubuntu.com>
parents:
55923
diff
changeset
|
43 [ |
|
6273
4333775b55fd
Brought up to date with new options and env vars.
Guido van Rossum <guido@python.org>
parents:
5876
diff
changeset
|
44 .B \-S |
|
4333775b55fd
Brought up to date with new options and env vars.
Guido van Rossum <guido@python.org>
parents:
5876
diff
changeset
|
45 ] |
|
4333775b55fd
Brought up to date with new options and env vars.
Guido van Rossum <guido@python.org>
parents:
5876
diff
changeset
|
46 [ |
| 7965 | 47 .B \-t |
| 48 ] | |
| 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 ] |
|
50786
2d453b221bec
Merged revisions 68292,68344,68361,68378,68424,68426,68429-68430,68450,68457,68480-68481,68493,68495,68499,68501,68512,68514-68515 via svnmerge from
Georg Brandl <georg@python.org>
parents:
34779
diff
changeset
|
66 [ |
|
2d453b221bec
Merged revisions 68292,68344,68361,68378,68424,68426,68429-68430,68450,68457,68480-68481,68493,68495,68499,68501,68512,68514-68515 via svnmerge from
Georg Brandl <georg@python.org>
parents:
34779
diff
changeset
|
67 .B \-3 |
|
2d453b221bec
Merged revisions 68292,68344,68361,68378,68424,68426,68429-68430,68450,68457,68480-68481,68493,68495,68499,68501,68512,68514-68515 via svnmerge from
Georg Brandl <georg@python.org>
parents:
34779
diff
changeset
|
68 ] |
|
58609
2ddbe62a6820
- Update python manual page (options -B, -O0, -s, environment variables
Matthias Klose <doko@ubuntu.com>
parents:
55923
diff
changeset
|
69 [ |
|
2ddbe62a6820
- Update python manual page (options -B, -O0, -s, environment variables
Matthias Klose <doko@ubuntu.com>
parents:
55923
diff
changeset
|
70 .B \-? |
|
2ddbe62a6820
- Update python manual page (options -B, -O0, -s, environment variables
Matthias Klose <doko@ubuntu.com>
parents:
55923
diff
changeset
|
71 ] |
|
6273
4333775b55fd
Brought up to date with new options and env vars.
Guido van Rossum <guido@python.org>
parents:
5876
diff
changeset
|
72 .br |
|
4333775b55fd
Brought up to date with new options and env vars.
Guido van Rossum <guido@python.org>
parents:
5876
diff
changeset
|
73 [ |
| 1529 | 74 .B \-c |
| 75 .I command | |
| 76 | | |
| 77 .I script | |
| 78 | | |
| 79 \- | |
| 80 ] | |
| 81 [ | |
| 82 .I arguments | |
| 83 ] | |
| 84 .SH DESCRIPTION | |
| 85 Python is an interpreted, interactive, object-oriented programming | |
| 86 language that combines remarkable power with very clear syntax. | |
| 87 For an introduction to programming in Python you are referred to the | |
| 88 Python Tutorial. | |
| 89 The Python Library Reference documents built-in and standard types, | |
| 90 constants, functions and modules. | |
| 91 Finally, the Python Reference Manual describes the syntax and | |
| 92 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
|
93 (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
|
94 .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
|
95 below; they may be installed on your system as well.) |
| 1529 | 96 .PP |
| 97 Python's basic power can be extended with your own modules written in | |
| 98 C or C++. | |
|
3875
2838db83d0ed
Got rid of all references to stdwin.
Guido van Rossum <guido@python.org>
parents:
2068
diff
changeset
|
99 On most systems such modules may be dynamically loaded. |
| 1529 | 100 Python is also adaptable as an extension language for existing |
| 101 applications. | |
| 102 See the internal documentation for hints. | |
|
17315
6be8bb4808e1
Mention pydoc in the man page
Andrew M. Kuchling <amk@amk.ca>
parents:
15612
diff
changeset
|
103 .PP |
|
6be8bb4808e1
Mention pydoc in the man page
Andrew M. Kuchling <amk@amk.ca>
parents:
15612
diff
changeset
|
104 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
|
105 viewed by running the |
|
6be8bb4808e1
Mention pydoc in the man page
Andrew M. Kuchling <amk@amk.ca>
parents:
15612
diff
changeset
|
106 .B pydoc |
|
6be8bb4808e1
Mention pydoc in the man page
Andrew M. Kuchling <amk@amk.ca>
parents:
15612
diff
changeset
|
107 program. |
| 1529 | 108 .SH COMMAND LINE OPTIONS |
| 109 .TP | |
|
58609
2ddbe62a6820
- Update python manual page (options -B, -O0, -s, environment variables
Matthias Klose <doko@ubuntu.com>
parents:
55923
diff
changeset
|
110 .B \-B |
|
2ddbe62a6820
- Update python manual page (options -B, -O0, -s, environment variables
Matthias Klose <doko@ubuntu.com>
parents:
55923
diff
changeset
|
111 Don't write |
|
2ddbe62a6820
- Update python manual page (options -B, -O0, -s, environment variables
Matthias Klose <doko@ubuntu.com>
parents:
55923
diff
changeset
|
112 .I .py[co] |
|
2ddbe62a6820
- Update python manual page (options -B, -O0, -s, environment variables
Matthias Klose <doko@ubuntu.com>
parents:
55923
diff
changeset
|
113 files on import. See also PYTHONDONTWRITEBYTECODE. |
|
2ddbe62a6820
- Update python manual page (options -B, -O0, -s, environment variables
Matthias Klose <doko@ubuntu.com>
parents:
55923
diff
changeset
|
114 .TP |
|
19739
8d2c7436b9d2
Document -Q. Move arguments around to be in strict alphabetical
Guido van Rossum <guido@python.org>
parents:
18844
diff
changeset
|
115 .BI "\-c " command |
|
8d2c7436b9d2
Document -Q. Move arguments around to be in strict alphabetical
Guido van Rossum <guido@python.org>
parents:
18844
diff
changeset
|
116 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
|
117 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
|
118 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
|
119 .TP |
| 1529 | 120 .B \-d |
| 121 Turn on parser debugging output (for wizards only, depending on | |
| 122 compilation options). | |
|
1559
df0fb788c0c1
Fix weird messed up paragraphs
Guido van Rossum <guido@python.org>
parents:
1529
diff
changeset
|
123 .TP |
|
19739
8d2c7436b9d2
Document -Q. Move arguments around to be in strict alphabetical
Guido van Rossum <guido@python.org>
parents:
18844
diff
changeset
|
124 .B \-E |
|
8d2c7436b9d2
Document -Q. Move arguments around to be in strict alphabetical
Guido van Rossum <guido@python.org>
parents:
18844
diff
changeset
|
125 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
|
126 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
|
127 .TP |
|
58609
2ddbe62a6820
- Update python manual page (options -B, -O0, -s, environment variables
Matthias Klose <doko@ubuntu.com>
parents:
55923
diff
changeset
|
128 .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
|
129 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
|
130 .TP |
| 1529 | 131 .B \-i |
| 132 When a script is passed as first argument or the \fB\-c\fP option is | |
| 133 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
|
134 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
|
135 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
|
136 raises an exception. |
| 1529 | 137 .TP |
| 33682 | 138 .BI "\-m " module-name |
| 139 Searches | |
| 140 .I sys.path | |
| 141 for the named module and runs the corresponding | |
| 142 .I .py | |
| 143 file as a script. | |
| 144 .TP | |
|
6273
4333775b55fd
Brought up to date with new options and env vars.
Guido van Rossum <guido@python.org>
parents:
5876
diff
changeset
|
145 .B \-O |
|
4333775b55fd
Brought up to date with new options and env vars.
Guido van Rossum <guido@python.org>
parents:
5876
diff
changeset
|
146 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
|
147 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
|
148 .I .pyc |
|
11214
96501cc3a663
Various updates, mostly to add information to the SEE ALSO and
Fred Drake <fdrake@acm.org>
parents:
7968
diff
changeset
|
149 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
|
150 .TP |
|
58609
2ddbe62a6820
- Update python manual page (options -B, -O0, -s, environment variables
Matthias Klose <doko@ubuntu.com>
parents:
55923
diff
changeset
|
151 .B \-O0 |
|
2ddbe62a6820
- Update python manual page (options -B, -O0, -s, environment variables
Matthias Klose <doko@ubuntu.com>
parents:
55923
diff
changeset
|
152 Discard docstrings in addition to the \fB-O\fP optimizations. |
|
2ddbe62a6820
- Update python manual page (options -B, -O0, -s, environment variables
Matthias Klose <doko@ubuntu.com>
parents:
55923
diff
changeset
|
153 .TP |
|
19739
8d2c7436b9d2
Document -Q. Move arguments around to be in strict alphabetical
Guido van Rossum <guido@python.org>
parents:
18844
diff
changeset
|
154 .BI "\-Q " argument |
|
8d2c7436b9d2
Document -Q. Move arguments around to be in strict alphabetical
Guido van Rossum <guido@python.org>
parents:
18844
diff
changeset
|
155 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
|
156 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
|
157 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
|
158 "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
|
159 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
|
160 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
|
161 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
|
162 .TP |
|
58609
2ddbe62a6820
- Update python manual page (options -B, -O0, -s, environment variables
Matthias Klose <doko@ubuntu.com>
parents:
55923
diff
changeset
|
163 .B \-s |
|
2ddbe62a6820
- Update python manual page (options -B, -O0, -s, environment variables
Matthias Klose <doko@ubuntu.com>
parents:
55923
diff
changeset
|
164 Don't add user site directory to sys.path. |
|
2ddbe62a6820
- Update python manual page (options -B, -O0, -s, environment variables
Matthias Klose <doko@ubuntu.com>
parents:
55923
diff
changeset
|
165 .TP |
|
6273
4333775b55fd
Brought up to date with new options and env vars.
Guido van Rossum <guido@python.org>
parents:
5876
diff
changeset
|
166 .B \-S |
|
4333775b55fd
Brought up to date with new options and env vars.
Guido van Rossum <guido@python.org>
parents:
5876
diff
changeset
|
167 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
|
168 .I site |
|
4333775b55fd
Brought up to date with new options and env vars.
Guido van Rossum <guido@python.org>
parents:
5876
diff
changeset
|
169 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
|
170 .I sys.path |
|
4333775b55fd
Brought up to date with new options and env vars.
Guido van Rossum <guido@python.org>
parents:
5876
diff
changeset
|
171 that it entails. |
|
4333775b55fd
Brought up to date with new options and env vars.
Guido van Rossum <guido@python.org>
parents:
5876
diff
changeset
|
172 .TP |
| 7965 | 173 .B \-t |
| 174 Issue a warning when a source file mixes tabs and spaces for | |
| 175 indentation in a way that makes it depend on the worth of a tab | |
| 176 expressed in spaces. Issue an error when the option is given twice. | |
| 177 .TP | |
|
1601
57b9b77da21b
Documented -u (unbuffered), undocumented -k (killprint)
Guido van Rossum <guido@python.org>
parents:
1559
diff
changeset
|
178 .B \-u |
|
24696
ba3038a27c1e
Document that -u puts stdin, stdout, and stderr in binary mode.
Sjoerd Mullender <sjoerd@acm.org>
parents:
24401
diff
changeset
|
179 Force stdin, stdout and stderr to be totally unbuffered. On systems |
|
ba3038a27c1e
Document that -u puts stdin, stdout, and stderr in binary mode.
Sjoerd Mullender <sjoerd@acm.org>
parents:
24401
diff
changeset
|
180 where it matters, also put stdin, stdout and stderr in binary mode. |
|
ba3038a27c1e
Document that -u puts stdin, stdout, and stderr in binary mode.
Sjoerd Mullender <sjoerd@acm.org>
parents:
24401
diff
changeset
|
181 Note that there is internal buffering in xreadlines(), readlines() and |
|
ba3038a27c1e
Document that -u puts stdin, stdout, and stderr in binary mode.
Sjoerd Mullender <sjoerd@acm.org>
parents:
24401
diff
changeset
|
182 file-object iterators ("for line in sys.stdin") which is not |
|
ba3038a27c1e
Document that -u puts stdin, stdout, and stderr in binary mode.
Sjoerd Mullender <sjoerd@acm.org>
parents:
24401
diff
changeset
|
183 influenced by this option. To work around this, you will want to use |
|
ba3038a27c1e
Document that -u puts stdin, stdout, and stderr in binary mode.
Sjoerd Mullender <sjoerd@acm.org>
parents:
24401
diff
changeset
|
184 "sys.stdin.readline()" inside a "while 1:" loop. |
| 1529 | 185 .TP |
| 186 .B \-v | |
| 187 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
|
188 (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
|
189 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
|
190 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
|
191 at exit. |
| 1529 | 192 .TP |
|
58609
2ddbe62a6820
- Update python manual page (options -B, -O0, -s, environment variables
Matthias Klose <doko@ubuntu.com>
parents:
55923
diff
changeset
|
193 .B \-V ", " \-\-version |
|
14602
24fbbf13daa5
Describe the -h and -V flags. Closes patch #101496
Barry Warsaw <barry@python.org>
parents:
14360
diff
changeset
|
194 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
|
195 .TP |
|
15612
e57f93ae4fe9
Document the -W option as best as I can.
Guido van Rossum <guido@python.org>
parents:
14602
diff
changeset
|
196 .BI "\-W " argument |
|
e57f93ae4fe9
Document the -W option as best as I can.
Guido van Rossum <guido@python.org>
parents:
14602
diff
changeset
|
197 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
|
198 .IR sys.stderr . |
|
e57f93ae4fe9
Document the -W option as best as I can.
Guido van Rossum <guido@python.org>
parents:
14602
diff
changeset
|
199 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
|
200 .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
|
201 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
|
202 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
|
203 Multiple |
|
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 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
|
206 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
|
207 Invalid |
|
e57f93ae4fe9
Document the -W option as best as I can.
Guido van Rossum <guido@python.org>
parents:
14602
diff
changeset
|
208 .B \-W |
|
e57f93ae4fe9
Document the -W option as best as I can.
Guido van Rossum <guido@python.org>
parents:
14602
diff
changeset
|
209 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
|
210 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
|
211 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
|
212 .I warnings |
|
e57f93ae4fe9
Document the -W option as best as I can.
Guido van Rossum <guido@python.org>
parents:
14602
diff
changeset
|
213 module. |
|
e57f93ae4fe9
Document the -W option as best as I can.
Guido van Rossum <guido@python.org>
parents:
14602
diff
changeset
|
214 |
|
e57f93ae4fe9
Document the -W option as best as I can.
Guido van Rossum <guido@python.org>
parents:
14602
diff
changeset
|
215 The simplest form of |
|
e57f93ae4fe9
Document the -W option as best as I can.
Guido van Rossum <guido@python.org>
parents:
14602
diff
changeset
|
216 .I argument |
|
e57f93ae4fe9
Document the -W option as best as I can.
Guido van Rossum <guido@python.org>
parents:
14602
diff
changeset
|
217 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
|
218 .I action |
|
e57f93ae4fe9
Document the -W option as best as I can.
Guido van Rossum <guido@python.org>
parents:
14602
diff
changeset
|
219 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
|
220 .B ignore |
|
e57f93ae4fe9
Document the -W option as best as I can.
Guido van Rossum <guido@python.org>
parents:
14602
diff
changeset
|
221 to ignore all warnings; |
|
e57f93ae4fe9
Document the -W option as best as I can.
Guido van Rossum <guido@python.org>
parents:
14602
diff
changeset
|
222 .B default |
|
e57f93ae4fe9
Document the -W option as best as I can.
Guido van Rossum <guido@python.org>
parents:
14602
diff
changeset
|
223 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
|
224 per source line); |
|
e57f93ae4fe9
Document the -W option as best as I can.
Guido van Rossum <guido@python.org>
parents:
14602
diff
changeset
|
225 .B all |
|
e57f93ae4fe9
Document the -W option as best as I can.
Guido van Rossum <guido@python.org>
parents:
14602
diff
changeset
|
226 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
|
227 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
|
228 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
|
229 .B module |
|
54840
2aeed4ecad5b
#6332: fix word dupes throughout the source.
Georg Brandl <georg@python.org>
parents:
52263
diff
changeset
|
230 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
|
231 module; |
|
e57f93ae4fe9
Document the -W option as best as I can.
Guido van Rossum <guido@python.org>
parents:
14602
diff
changeset
|
232 .B once |
|
e57f93ae4fe9
Document the -W option as best as I can.
Guido van Rossum <guido@python.org>
parents:
14602
diff
changeset
|
233 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
|
234 .B error |
|
e57f93ae4fe9
Document the -W option as best as I can.
Guido van Rossum <guido@python.org>
parents:
14602
diff
changeset
|
235 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
|
236 |
|
e57f93ae4fe9
Document the -W option as best as I can.
Guido van Rossum <guido@python.org>
parents:
14602
diff
changeset
|
237 The full form of |
|
e57f93ae4fe9
Document the -W option as best as I can.
Guido van Rossum <guido@python.org>
parents:
14602
diff
changeset
|
238 .I argument |
|
e57f93ae4fe9
Document the -W option as best as I can.
Guido van Rossum <guido@python.org>
parents:
14602
diff
changeset
|
239 is |
|
e57f93ae4fe9
Document the -W option as best as I can.
Guido van Rossum <guido@python.org>
parents:
14602
diff
changeset
|
240 .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
|
241 Here, |
|
e57f93ae4fe9
Document the -W option as best as I can.
Guido van Rossum <guido@python.org>
parents:
14602
diff
changeset
|
242 .I action |
|
e57f93ae4fe9
Document the -W option as best as I can.
Guido van Rossum <guido@python.org>
parents:
14602
diff
changeset
|
243 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
|
244 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
|
245 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
|
246 .I message |
|
e57f93ae4fe9
Document the -W option as best as I can.
Guido van Rossum <guido@python.org>
parents:
14602
diff
changeset
|
247 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
|
248 case-insensitive. The |
|
e57f93ae4fe9
Document the -W option as best as I can.
Guido van Rossum <guido@python.org>
parents:
14602
diff
changeset
|
249 .I category |
|
e57f93ae4fe9
Document the -W option as best as I can.
Guido van Rossum <guido@python.org>
parents:
14602
diff
changeset
|
250 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
|
251 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
|
252 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
|
253 be given. The |
|
e57f93ae4fe9
Document the -W option as best as I can.
Guido van Rossum <guido@python.org>
parents:
14602
diff
changeset
|
254 .I module |
|
e57f93ae4fe9
Document the -W option as best as I can.
Guido van Rossum <guido@python.org>
parents:
14602
diff
changeset
|
255 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
|
256 case-sensitive. The |
|
e57f93ae4fe9
Document the -W option as best as I can.
Guido van Rossum <guido@python.org>
parents:
14602
diff
changeset
|
257 .I line |
|
e57f93ae4fe9
Document the -W option as best as I can.
Guido van Rossum <guido@python.org>
parents:
14602
diff
changeset
|
258 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
|
259 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
|
260 .TP |
|
19739
8d2c7436b9d2
Document -Q. Move arguments around to be in strict alphabetical
Guido van Rossum <guido@python.org>
parents:
18844
diff
changeset
|
261 .B \-x |
|
8d2c7436b9d2
Document -Q. Move arguments around to be in strict alphabetical
Guido van Rossum <guido@python.org>
parents:
18844
diff
changeset
|
262 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
|
263 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
|
264 be off by one! |
|
50786
2d453b221bec
Merged revisions 68292,68344,68361,68378,68424,68426,68429-68430,68450,68457,68480-68481,68493,68495,68499,68501,68512,68514-68515 via svnmerge from
Georg Brandl <georg@python.org>
parents:
34779
diff
changeset
|
265 .TP |
|
2d453b221bec
Merged revisions 68292,68344,68361,68378,68424,68426,68429-68430,68450,68457,68480-68481,68493,68495,68499,68501,68512,68514-68515 via svnmerge from
Georg Brandl <georg@python.org>
parents:
34779
diff
changeset
|
266 .B \-3 |
|
2d453b221bec
Merged revisions 68292,68344,68361,68378,68424,68426,68429-68430,68450,68457,68480-68481,68493,68495,68499,68501,68512,68514-68515 via svnmerge from
Georg Brandl <georg@python.org>
parents:
34779
diff
changeset
|
267 Warn about Python 3.x incompatibilities that 2to3 cannot trivially fix. |
| 1529 | 268 .SH INTERPRETER INTERFACE |
| 269 The interpreter interface resembles that of the UNIX shell: when | |
| 270 called with standard input connected to a tty device, it prompts for | |
| 271 commands and executes them until an EOF is read; when called with a | |
| 272 file name argument or with a file as standard input, it reads and | |
| 273 executes a | |
| 274 .I script | |
| 275 from that file; | |
| 276 when called with | |
| 277 .B \-c | |
| 278 .I command, | |
| 279 it executes the Python statement(s) given as | |
| 280 .I command. | |
| 281 Here | |
| 282 .I command | |
| 283 may contain multiple statements separated by newlines. | |
| 284 Leading whitespace is significant in Python statements! | |
|
34779
997b255e1ccc
fix two typos in python(1)
Matthias Klose <doko@ubuntu.com>
parents:
33685
diff
changeset
|
285 In non-interactive mode, the entire input is parsed before it is |
| 1529 | 286 executed. |
| 287 .PP | |
| 288 If available, the script name and additional arguments thereafter are | |
| 289 passed to the script in the Python variable | |
| 290 .I sys.argv , | |
| 291 which is a list of strings (you must first | |
| 292 .I import sys | |
| 293 to be able to access it). | |
| 294 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
|
295 .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
|
296 is an empty string; if |
| 1529 | 297 .B \-c |
| 298 is used, | |
| 299 .I sys.argv[0] | |
| 300 contains the string | |
| 301 .I '-c'. | |
|
3875
2838db83d0ed
Got rid of all references to stdwin.
Guido van Rossum <guido@python.org>
parents:
2068
diff
changeset
|
302 Note that options interpreted by the Python interpreter itself |
| 1529 | 303 are not placed in |
| 304 .I sys.argv. | |
| 305 .PP | |
| 306 In interactive mode, the primary prompt is `>>>'; the second prompt | |
| 307 (which appears when a command is not complete) is `...'. | |
| 308 The prompts can be changed by assignment to | |
| 309 .I sys.ps1 | |
| 310 or | |
| 311 .I sys.ps2. | |
| 312 The interpreter quits when it reads an EOF at a prompt. | |
| 313 When an unhandled exception occurs, a stack trace is printed and | |
| 314 control returns to the primary prompt; in non-interactive mode, the | |
| 315 interpreter exits after printing the stack trace. | |
| 316 The interrupt signal raises the | |
| 317 .I Keyboard\%Interrupt | |
| 318 exception; other UNIX signals are not caught (except that SIGPIPE is | |
| 319 sometimes ignored, in favor of the | |
| 320 .I IOError | |
| 321 exception). Error messages are written to stderr. | |
| 322 .SH FILES AND DIRECTORIES | |
| 323 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
|
324 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
|
325 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
|
326 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
|
327 .IP \fI${exec_prefix}/bin/python\fP |
| 1529 | 328 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
|
329 .PP |
|
96501cc3a663
Various updates, mostly to add information to the SEE ALSO and
Fred Drake <fdrake@acm.org>
parents:
7968
diff
changeset
|
330 .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
|
331 .br |
|
96501cc3a663
Various updates, mostly to add information to the SEE ALSO and
Fred Drake <fdrake@acm.org>
parents:
7968
diff
changeset
|
332 .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
|
333 .RS |
|
96501cc3a663
Various updates, mostly to add information to the SEE ALSO and
Fred Drake <fdrake@acm.org>
parents:
7968
diff
changeset
|
334 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
|
335 modules. |
|
96501cc3a663
Various updates, mostly to add information to the SEE ALSO and
Fred Drake <fdrake@acm.org>
parents:
7968
diff
changeset
|
336 .RE |
|
96501cc3a663
Various updates, mostly to add information to the SEE ALSO and
Fred Drake <fdrake@acm.org>
parents:
7968
diff
changeset
|
337 .PP |
|
96501cc3a663
Various updates, mostly to add information to the SEE ALSO and
Fred Drake <fdrake@acm.org>
parents:
7968
diff
changeset
|
338 .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
|
339 .br |
|
96501cc3a663
Various updates, mostly to add information to the SEE ALSO and
Fred Drake <fdrake@acm.org>
parents:
7968
diff
changeset
|
340 .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
|
341 .RS |
|
96501cc3a663
Various updates, mostly to add information to the SEE ALSO and
Fred Drake <fdrake@acm.org>
parents:
7968
diff
changeset
|
342 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
|
343 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
|
344 interpreter. |
|
96501cc3a663
Various updates, mostly to add information to the SEE ALSO and
Fred Drake <fdrake@acm.org>
parents:
7968
diff
changeset
|
345 .RE |
|
96501cc3a663
Various updates, mostly to add information to the SEE ALSO and
Fred Drake <fdrake@acm.org>
parents:
7968
diff
changeset
|
346 .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
|
347 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
|
348 not used by default or by most applications. |
| 1529 | 349 .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
|
350 .IP PYTHONHOME |
|
4333775b55fd
Brought up to date with new options and env vars.
Guido van Rossum <guido@python.org>
parents:
5876
diff
changeset
|
351 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
|
352 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
|
353 ${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
|
354 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
|
355 \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
|
356 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
|
357 for these, set $PYTHONHOME to ${prefix}:${exec_prefix}. |
| 1529 | 358 .IP PYTHONPATH |
| 359 Augments the default search path for module files. | |
| 360 The format is the same as the shell's $PATH: one or more directory | |
| 361 pathnames separated by colons. | |
|
34779
997b255e1ccc
fix two typos in python(1)
Matthias Klose <doko@ubuntu.com>
parents:
33685
diff
changeset
|
362 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
|
363 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
|
364 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
|
365 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
|
366 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
|
367 inserted in the path in front of $PYTHONPATH. |
| 1529 | 368 The search path can be manipulated from within a Python program as the |
| 369 variable | |
| 370 .I sys.path . | |
| 371 .IP PYTHONSTARTUP | |
| 372 If this is the name of a readable file, the Python commands in that | |
| 373 file are executed before the first prompt is displayed in interactive | |
| 374 mode. | |
| 375 The file is executed in the same name space where interactive commands | |
| 376 are executed so that objects defined or imported in it can be used | |
| 377 without qualification in the interactive session. | |
| 378 You can also change the prompts | |
| 379 .I sys.ps1 | |
| 380 and | |
| 381 .I sys.ps2 | |
| 382 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
|
383 .IP PYTHONY2K |
|
045f55135ad0
Document the PYTHONY2K environment variable that had been left out of this
Fred Drake <fdrake@acm.org>
parents:
18808
diff
changeset
|
384 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
|
385 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
|
386 2-digit years are converted based on rules described in the \fItime\fP |
| 23406 | 387 module documentation. |
|
20401
b74610c92d8b
SF patch #467455 : Enhanced environment variables, by Toby Dickenson.
Guido van Rossum <guido@python.org>
parents:
19740
diff
changeset
|
388 .IP PYTHONOPTIMIZE |
|
b74610c92d8b
SF patch #467455 : Enhanced environment variables, by Toby Dickenson.
Guido van Rossum <guido@python.org>
parents:
19740
diff
changeset
|
389 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
|
390 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
|
391 specifying \fB\-O\fP multiple times. |
| 1529 | 392 .IP PYTHONDEBUG |
| 393 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
|
394 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
|
395 specifying \fB\-d\fP multiple times. |
|
58609
2ddbe62a6820
- Update python manual page (options -B, -O0, -s, environment variables
Matthias Klose <doko@ubuntu.com>
parents:
55923
diff
changeset
|
396 .IP PYTHONDONTWRITEBYTECODE |
|
2ddbe62a6820
- Update python manual page (options -B, -O0, -s, environment variables
Matthias Klose <doko@ubuntu.com>
parents:
55923
diff
changeset
|
397 If this is set to a non-empty string it is equivalent to specifying |
|
2ddbe62a6820
- Update python manual page (options -B, -O0, -s, environment variables
Matthias Klose <doko@ubuntu.com>
parents:
55923
diff
changeset
|
398 the \fB\-B\fP option (don't try to write |
|
2ddbe62a6820
- Update python manual page (options -B, -O0, -s, environment variables
Matthias Klose <doko@ubuntu.com>
parents:
55923
diff
changeset
|
399 .I .py[co] |
|
2ddbe62a6820
- Update python manual page (options -B, -O0, -s, environment variables
Matthias Klose <doko@ubuntu.com>
parents:
55923
diff
changeset
|
400 files). |
| 1529 | 401 .IP PYTHONINSPECT |
| 402 If this is set to a non-empty string it is equivalent to specifying | |
| 403 the \fB\-i\fP option. | |
|
65274
e76f554158a8
Merged revisions 85436 via svnmerge from
Benjamin Peterson <benjamin@python.org>
parents:
60435
diff
changeset
|
404 .IP PYTHONIOENCODING |
|
e76f554158a8
Merged revisions 85436 via svnmerge from
Benjamin Peterson <benjamin@python.org>
parents:
60435
diff
changeset
|
405 If this is set before running the interpreter, it overrides the encoding used |
|
e76f554158a8
Merged revisions 85436 via svnmerge from
Benjamin Peterson <benjamin@python.org>
parents:
60435
diff
changeset
|
406 for stdin/stdout/stderr, in the syntax |
|
e76f554158a8
Merged revisions 85436 via svnmerge from
Benjamin Peterson <benjamin@python.org>
parents:
60435
diff
changeset
|
407 .IB encodingname ":" errorhandler |
|
e76f554158a8
Merged revisions 85436 via svnmerge from
Benjamin Peterson <benjamin@python.org>
parents:
60435
diff
changeset
|
408 The |
|
e76f554158a8
Merged revisions 85436 via svnmerge from
Benjamin Peterson <benjamin@python.org>
parents:
60435
diff
changeset
|
409 .IB errorhandler |
|
e76f554158a8
Merged revisions 85436 via svnmerge from
Benjamin Peterson <benjamin@python.org>
parents:
60435
diff
changeset
|
410 part is optional and has the same meaning as in str.encode. For stderr, the |
|
e76f554158a8
Merged revisions 85436 via svnmerge from
Benjamin Peterson <benjamin@python.org>
parents:
60435
diff
changeset
|
411 .IB errorhandler |
|
e76f554158a8
Merged revisions 85436 via svnmerge from
Benjamin Peterson <benjamin@python.org>
parents:
60435
diff
changeset
|
412 part is ignored; the handler will always be \'backslashreplace\'. |
|
58609
2ddbe62a6820
- Update python manual page (options -B, -O0, -s, environment variables
Matthias Klose <doko@ubuntu.com>
parents:
55923
diff
changeset
|
413 .IP PYTHONNOUSERSITE |
|
65274
e76f554158a8
Merged revisions 85436 via svnmerge from
Benjamin Peterson <benjamin@python.org>
parents:
60435
diff
changeset
|
414 If this is set to a non-empty string it is equivalent to specifying the |
|
e76f554158a8
Merged revisions 85436 via svnmerge from
Benjamin Peterson <benjamin@python.org>
parents:
60435
diff
changeset
|
415 \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
|
416 .IP PYTHONUNBUFFERED |
| 1529 | 417 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
|
418 the \fB\-u\fP option. |
| 1529 | 419 .IP PYTHONVERBOSE |
| 420 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
|
421 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
|
422 specifying \fB\-v\fP multiple times. |
|
60435
c9e4e12e9cb6
document new PYTHONWARNINGS env var
Philip Jenvey <pjenvey@underboss.org>
parents:
58609
diff
changeset
|
423 .IP PYTHONWARNINGS |
|
c9e4e12e9cb6
document new PYTHONWARNINGS env var
Philip Jenvey <pjenvey@underboss.org>
parents:
58609
diff
changeset
|
424 If this is set to a comma-separated string it is equivalent to |
|
c9e4e12e9cb6
document new PYTHONWARNINGS env var
Philip Jenvey <pjenvey@underboss.org>
parents:
58609
diff
changeset
|
425 specifying the \fB\-W\fP option for each separate value. |
| 1529 | 426 .SH AUTHOR |
|
33684
3e6f56e8104a
Take out Guido's name and put in the PSF
Andrew M. Kuchling <amk@amk.ca>
parents:
33683
diff
changeset
|
427 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
|
428 .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
|
429 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
|
430 .br |
| 33683 | 431 Documentation: http://docs.python.org/ |
|
3875
2838db83d0ed
Got rid of all references to stdwin.
Guido van Rossum <guido@python.org>
parents:
2068
diff
changeset
|
432 .br |
| 33683 | 433 Developer resources: http://www.python.org/dev/ |
|
14360
d1d5e2dc29db
Clean up a bit. Drop -X option, update date, remove documentation
Guido van Rossum <guido@python.org>
parents:
13255
diff
changeset
|
434 .br |
| 55923 | 435 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
|
436 .br |
| 55923 | 437 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
|
438 .br |
|
18844
045f55135ad0
Document the PYTHONY2K environment variable that had been left out of this
Fred Drake <fdrake@acm.org>
parents:
18808
diff
changeset
|
439 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
|
440 .SH LICENSING |
|
d1d5e2dc29db
Clean up a bit. Drop -X option, update date, remove documentation
Guido van Rossum <guido@python.org>
parents:
13255
diff
changeset
|
441 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
|
442 "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
|
443 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
|
444 DISCLAIMER OF ALL WARRANTIES. |
