Mercurial > cpython-lru_cache-weakref
annotate Misc/python.man @ 50786:2d453b221bec 2.6
Merged revisions 68292,68344,68361,68378,68424,68426,68429-68430,68450,68457,68480-68481,68493,68495,68499,68501,68512,68514-68515 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk
........
r68292 | skip.montanaro | 2009-01-04 11:36:58 +0100 (So, 04 Jan 2009) | 3 lines
If user configures --without-gcc give preference to $CC instead of blindly
assuming the compiler will be "cc".
........
r68344 | marc-andre.lemburg | 2009-01-05 20:43:35 +0100 (Mo, 05 Jan 2009) | 7 lines
Fix #4846 (Py_UNICODE_ISSPACE causes linker error) by moving the declaration
into the extern "C" section.
Add a few more comments and apply some minor edits to make the file contents
fit the original structure again.
........
r68361 | antoine.pitrou | 2009-01-06 19:34:08 +0100 (Di, 06 Jan 2009) | 3 lines
Use shutil.rmtree rather than os.rmdir.
........
r68378 | mark.dickinson | 2009-01-07 18:48:33 +0100 (Mi, 07 Jan 2009) | 2 lines
Issue #4869: clarify documentation for random.expovariate.
........
r68424 | benjamin.peterson | 2009-01-09 03:53:35 +0100 (Fr, 09 Jan 2009) | 1 line
specify what -3 warnings are about
........
r68426 | benjamin.peterson | 2009-01-09 04:03:05 +0100 (Fr, 09 Jan 2009) | 1 line
fix spelling
........
r68429 | benjamin.peterson | 2009-01-09 04:05:14 +0100 (Fr, 09 Jan 2009) | 1 line
add -3 to manpage
........
r68430 | benjamin.peterson | 2009-01-09 04:07:27 +0100 (Fr, 09 Jan 2009) | 1 line
be more specific in -3 option help
........
r68450 | jeffrey.yasskin | 2009-01-09 17:47:07 +0100 (Fr, 09 Jan 2009) | 3 lines
Fix issue 4884, preventing a crash in the socket code when python is compiled
with llvm-gcc and run with a glibc <2.10.
........
r68457 | kristjan.jonsson | 2009-01-09 21:10:59 +0100 (Fr, 09 Jan 2009) | 1 line
Issue 3677: Fix import from UNC paths on Windows.
........
r68480 | vinay.sajip | 2009-01-10 14:38:04 +0100 (Sa, 10 Jan 2009) | 1 line
Minor documentation changes cross-referencing NullHandler to the documentation on configuring logging in a library.
........
r68481 | vinay.sajip | 2009-01-10 14:42:04 +0100 (Sa, 10 Jan 2009) | 1 line
Corrected an incorrect self-reference.
........
r68493 | benjamin.peterson | 2009-01-10 18:18:55 +0100 (Sa, 10 Jan 2009) | 1 line
rewrite verbose conditionals
........
r68495 | benjamin.peterson | 2009-01-10 18:36:44 +0100 (Sa, 10 Jan 2009) | 1 line
tp_iter only exists with Py_TPFLAGS_HAVE_ITER #4901
........
r68499 | mark.dickinson | 2009-01-10 20:14:55 +0100 (Sa, 10 Jan 2009) | 2 lines
Remove an unnecessary check from test_decimal.
........
r68501 | vinay.sajip | 2009-01-10 20:22:57 +0100 (Sa, 10 Jan 2009) | 1 line
Corrected minor typo and added .currentmodule directives to fix missing cross-references.
........
r68512 | benjamin.peterson | 2009-01-10 23:42:10 +0100 (Sa, 10 Jan 2009) | 1 line
make tests fail if they can't be imported
........
r68514 | benjamin.peterson | 2009-01-11 00:41:59 +0100 (So, 11 Jan 2009) | 1 line
move seealso to a more appropiate place
........
r68515 | benjamin.peterson | 2009-01-11 00:49:08 +0100 (So, 11 Jan 2009) | 1 line
macos 9 isn't supported
........
| author | Georg Brandl <georg@python.org> |
|---|---|
| date | Wed, 14 Jan 2009 00:00:17 +0000 |
| parents | 997b255e1ccc |
| children | d1b0bd48ba15 |
| 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 |
| 3 ./" To view this file while editing, run it through groff: | |
| 4 ./" groff -Tascii -man python.man | less | |
| 5 | |
| 1529 | 6 .SH NAME |
| 7 python \- an interpreted, interactive, object-oriented programming language | |
| 8 .SH SYNOPSIS | |
| 9 .B python | |
| 10 [ | |
| 11 .B \-d | |
| 12 ] | |
| 13 [ | |
|
19739
8d2c7436b9d2
Document -Q. Move arguments around to be in strict alphabetical
Guido van Rossum <guido@python.org>
parents:
18844
diff
changeset
|
14 .B \-E |
|
8d2c7436b9d2
Document -Q. Move arguments around to be in strict alphabetical
Guido van Rossum <guido@python.org>
parents:
18844
diff
changeset
|
15 ] |
|
8d2c7436b9d2
Document -Q. Move arguments around to be in strict alphabetical
Guido van Rossum <guido@python.org>
parents:
18844
diff
changeset
|
16 [ |
|
8d2c7436b9d2
Document -Q. Move arguments around to be in strict alphabetical
Guido van Rossum <guido@python.org>
parents:
18844
diff
changeset
|
17 .B \-h |
|
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 [ |
| 1529 | 20 .B \-i |
| 21 ] | |
| 22 [ | |
| 33682 | 23 .B \-m |
| 24 .I module-name | |
| 25 ] | |
| 26 [ | |
|
6273
4333775b55fd
Brought up to date with new options and env vars.
Guido van Rossum <guido@python.org>
parents:
5876
diff
changeset
|
27 .B \-O |
|
4333775b55fd
Brought up to date with new options and env vars.
Guido van Rossum <guido@python.org>
parents:
5876
diff
changeset
|
28 ] |
|
19739
8d2c7436b9d2
Document -Q. Move arguments around to be in strict alphabetical
Guido van Rossum <guido@python.org>
parents:
18844
diff
changeset
|
29 .br |
|
8d2c7436b9d2
Document -Q. Move arguments around to be in strict alphabetical
Guido van Rossum <guido@python.org>
parents:
18844
diff
changeset
|
30 [ |
|
8d2c7436b9d2
Document -Q. Move arguments around to be in strict alphabetical
Guido van Rossum <guido@python.org>
parents:
18844
diff
changeset
|
31 .B -Q |
|
8d2c7436b9d2
Document -Q. Move arguments around to be in strict alphabetical
Guido van Rossum <guido@python.org>
parents:
18844
diff
changeset
|
32 .I argument |
|
8d2c7436b9d2
Document -Q. Move arguments around to be in strict alphabetical
Guido van Rossum <guido@python.org>
parents:
18844
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 [ |
|
4333775b55fd
Brought up to date with new options and env vars.
Guido van Rossum <guido@python.org>
parents:
5876
diff
changeset
|
35 .B \-S |
|
4333775b55fd
Brought up to date with new options and env vars.
Guido van Rossum <guido@python.org>
parents:
5876
diff
changeset
|
36 ] |
|
4333775b55fd
Brought up to date with new options and env vars.
Guido van Rossum <guido@python.org>
parents:
5876
diff
changeset
|
37 [ |
| 7965 | 38 .B \-t |
| 39 ] | |
| 40 [ | |
|
1601
57b9b77da21b
Documented -u (unbuffered), undocumented -k (killprint)
Guido van Rossum <guido@python.org>
parents:
1559
diff
changeset
|
41 .B \-u |
| 1529 | 42 ] |
|
19739
8d2c7436b9d2
Document -Q. Move arguments around to be in strict alphabetical
Guido van Rossum <guido@python.org>
parents:
18844
diff
changeset
|
43 .br |
|
8d2c7436b9d2
Document -Q. Move arguments around to be in strict alphabetical
Guido van Rossum <guido@python.org>
parents:
18844
diff
changeset
|
44 [ |
|
8d2c7436b9d2
Document -Q. Move arguments around to be in strict alphabetical
Guido van Rossum <guido@python.org>
parents:
18844
diff
changeset
|
45 .B \-v |
|
14602
24fbbf13daa5
Describe the -h and -V flags. Closes patch #101496
Barry Warsaw <barry@python.org>
parents:
14360
diff
changeset
|
46 ] |
|
24fbbf13daa5
Describe the -h and -V flags. Closes patch #101496
Barry Warsaw <barry@python.org>
parents:
14360
diff
changeset
|
47 [ |
|
24fbbf13daa5
Describe the -h and -V flags. Closes patch #101496
Barry Warsaw <barry@python.org>
parents:
14360
diff
changeset
|
48 .B \-V |
|
24fbbf13daa5
Describe the -h and -V flags. Closes patch #101496
Barry Warsaw <barry@python.org>
parents:
14360
diff
changeset
|
49 ] |
|
15612
e57f93ae4fe9
Document the -W option as best as I can.
Guido van Rossum <guido@python.org>
parents:
14602
diff
changeset
|
50 [ |
|
e57f93ae4fe9
Document the -W option as best as I can.
Guido van Rossum <guido@python.org>
parents:
14602
diff
changeset
|
51 .B \-W |
|
e57f93ae4fe9
Document the -W option as best as I can.
Guido van Rossum <guido@python.org>
parents:
14602
diff
changeset
|
52 .I argument |
|
e57f93ae4fe9
Document the -W option as best as I can.
Guido van Rossum <guido@python.org>
parents:
14602
diff
changeset
|
53 ] |
|
19739
8d2c7436b9d2
Document -Q. Move arguments around to be in strict alphabetical
Guido van Rossum <guido@python.org>
parents:
18844
diff
changeset
|
54 [ |
|
8d2c7436b9d2
Document -Q. Move arguments around to be in strict alphabetical
Guido van Rossum <guido@python.org>
parents:
18844
diff
changeset
|
55 .B \-x |
|
8d2c7436b9d2
Document -Q. Move arguments around to be in strict alphabetical
Guido van Rossum <guido@python.org>
parents:
18844
diff
changeset
|
56 ] |
|
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
|
57 [ |
|
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
|
58 .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
|
59 ] |
|
6273
4333775b55fd
Brought up to date with new options and env vars.
Guido van Rossum <guido@python.org>
parents:
5876
diff
changeset
|
60 .br |
|
4333775b55fd
Brought up to date with new options and env vars.
Guido van Rossum <guido@python.org>
parents:
5876
diff
changeset
|
61 [ |
| 1529 | 62 .B \-c |
| 63 .I command | |
| 64 | | |
| 65 .I script | |
| 66 | | |
| 67 \- | |
| 68 ] | |
| 69 [ | |
| 70 .I arguments | |
| 71 ] | |
| 72 .SH DESCRIPTION | |
| 73 Python is an interpreted, interactive, object-oriented programming | |
| 74 language that combines remarkable power with very clear syntax. | |
| 75 For an introduction to programming in Python you are referred to the | |
| 76 Python Tutorial. | |
| 77 The Python Library Reference documents built-in and standard types, | |
| 78 constants, functions and modules. | |
| 79 Finally, the Python Reference Manual describes the syntax and | |
| 80 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
|
81 (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
|
82 .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
|
83 below; they may be installed on your system as well.) |
| 1529 | 84 .PP |
| 85 Python's basic power can be extended with your own modules written in | |
| 86 C or C++. | |
|
3875
2838db83d0ed
Got rid of all references to stdwin.
Guido van Rossum <guido@python.org>
parents:
2068
diff
changeset
|
87 On most systems such modules may be dynamically loaded. |
| 1529 | 88 Python is also adaptable as an extension language for existing |
| 89 applications. | |
| 90 See the internal documentation for hints. | |
|
17315
6be8bb4808e1
Mention pydoc in the man page
Andrew M. Kuchling <amk@amk.ca>
parents:
15612
diff
changeset
|
91 .PP |
|
6be8bb4808e1
Mention pydoc in the man page
Andrew M. Kuchling <amk@amk.ca>
parents:
15612
diff
changeset
|
92 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
|
93 viewed by running the |
|
6be8bb4808e1
Mention pydoc in the man page
Andrew M. Kuchling <amk@amk.ca>
parents:
15612
diff
changeset
|
94 .B pydoc |
|
6be8bb4808e1
Mention pydoc in the man page
Andrew M. Kuchling <amk@amk.ca>
parents:
15612
diff
changeset
|
95 program. |
| 1529 | 96 .SH COMMAND LINE OPTIONS |
| 97 .TP | |
|
19739
8d2c7436b9d2
Document -Q. Move arguments around to be in strict alphabetical
Guido van Rossum <guido@python.org>
parents:
18844
diff
changeset
|
98 .BI "\-c " command |
|
8d2c7436b9d2
Document -Q. Move arguments around to be in strict alphabetical
Guido van Rossum <guido@python.org>
parents:
18844
diff
changeset
|
99 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
|
100 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
|
101 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
|
102 .TP |
| 1529 | 103 .B \-d |
| 104 Turn on parser debugging output (for wizards only, depending on | |
| 105 compilation options). | |
|
1559
df0fb788c0c1
Fix weird messed up paragraphs
Guido van Rossum <guido@python.org>
parents:
1529
diff
changeset
|
106 .TP |
|
19739
8d2c7436b9d2
Document -Q. Move arguments around to be in strict alphabetical
Guido van Rossum <guido@python.org>
parents:
18844
diff
changeset
|
107 .B \-E |
|
8d2c7436b9d2
Document -Q. Move arguments around to be in strict alphabetical
Guido van Rossum <guido@python.org>
parents:
18844
diff
changeset
|
108 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
|
109 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
|
110 .TP |
|
8d2c7436b9d2
Document -Q. Move arguments around to be in strict alphabetical
Guido van Rossum <guido@python.org>
parents:
18844
diff
changeset
|
111 .B \-h |
|
8d2c7436b9d2
Document -Q. Move arguments around to be in strict alphabetical
Guido van Rossum <guido@python.org>
parents:
18844
diff
changeset
|
112 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
|
113 .TP |
| 1529 | 114 .B \-i |
| 115 When a script is passed as first argument or the \fB\-c\fP option is | |
| 116 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
|
117 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
|
118 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
|
119 raises an exception. |
| 1529 | 120 .TP |
| 33682 | 121 .BI "\-m " module-name |
| 122 Searches | |
| 123 .I sys.path | |
| 124 for the named module and runs the corresponding | |
| 125 .I .py | |
| 126 file as a script. | |
| 127 .TP | |
|
6273
4333775b55fd
Brought up to date with new options and env vars.
Guido van Rossum <guido@python.org>
parents:
5876
diff
changeset
|
128 .B \-O |
|
4333775b55fd
Brought up to date with new options and env vars.
Guido van Rossum <guido@python.org>
parents:
5876
diff
changeset
|
129 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
|
130 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
|
131 .I .pyc |
|
11214
96501cc3a663
Various updates, mostly to add information to the SEE ALSO and
Fred Drake <fdrake@acm.org>
parents:
7968
diff
changeset
|
132 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
|
133 .TP |
|
19739
8d2c7436b9d2
Document -Q. Move arguments around to be in strict alphabetical
Guido van Rossum <guido@python.org>
parents:
18844
diff
changeset
|
134 .BI "\-Q " argument |
|
8d2c7436b9d2
Document -Q. Move arguments around to be in strict alphabetical
Guido van Rossum <guido@python.org>
parents:
18844
diff
changeset
|
135 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
|
136 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
|
137 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
|
138 "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
|
139 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
|
140 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
|
141 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
|
142 .TP |
|
6273
4333775b55fd
Brought up to date with new options and env vars.
Guido van Rossum <guido@python.org>
parents:
5876
diff
changeset
|
143 .B \-S |
|
4333775b55fd
Brought up to date with new options and env vars.
Guido van Rossum <guido@python.org>
parents:
5876
diff
changeset
|
144 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
|
145 .I site |
|
4333775b55fd
Brought up to date with new options and env vars.
Guido van Rossum <guido@python.org>
parents:
5876
diff
changeset
|
146 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
|
147 .I sys.path |
|
4333775b55fd
Brought up to date with new options and env vars.
Guido van Rossum <guido@python.org>
parents:
5876
diff
changeset
|
148 that it entails. |
|
4333775b55fd
Brought up to date with new options and env vars.
Guido van Rossum <guido@python.org>
parents:
5876
diff
changeset
|
149 .TP |
| 7965 | 150 .B \-t |
| 151 Issue a warning when a source file mixes tabs and spaces for | |
| 152 indentation in a way that makes it depend on the worth of a tab | |
| 153 expressed in spaces. Issue an error when the option is given twice. | |
| 154 .TP | |
|
1601
57b9b77da21b
Documented -u (unbuffered), undocumented -k (killprint)
Guido van Rossum <guido@python.org>
parents:
1559
diff
changeset
|
155 .B \-u |
|
24696
ba3038a27c1e
Document that -u puts stdin, stdout, and stderr in binary mode.
Sjoerd Mullender <sjoerd@acm.org>
parents:
24401
diff
changeset
|
156 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
|
157 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
|
158 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
|
159 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
|
160 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
|
161 "sys.stdin.readline()" inside a "while 1:" loop. |
| 1529 | 162 .TP |
| 163 .B \-v | |
| 164 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
|
165 (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
|
166 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
|
167 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
|
168 at exit. |
| 1529 | 169 .TP |
|
14602
24fbbf13daa5
Describe the -h and -V flags. Closes patch #101496
Barry Warsaw <barry@python.org>
parents:
14360
diff
changeset
|
170 .B \-V |
|
24fbbf13daa5
Describe the -h and -V flags. Closes patch #101496
Barry Warsaw <barry@python.org>
parents:
14360
diff
changeset
|
171 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
|
172 .TP |
|
15612
e57f93ae4fe9
Document the -W option as best as I can.
Guido van Rossum <guido@python.org>
parents:
14602
diff
changeset
|
173 .BI "\-W " argument |
|
e57f93ae4fe9
Document the -W option as best as I can.
Guido van Rossum <guido@python.org>
parents:
14602
diff
changeset
|
174 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
|
175 .IR sys.stderr . |
|
e57f93ae4fe9
Document the -W option as best as I can.
Guido van Rossum <guido@python.org>
parents:
14602
diff
changeset
|
176 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
|
177 .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
|
178 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
|
179 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
|
180 Multiple |
|
e57f93ae4fe9
Document the -W option as best as I can.
Guido van Rossum <guido@python.org>
parents:
14602
diff
changeset
|
181 .B \-W |
|
e57f93ae4fe9
Document the -W option as best as I can.
Guido van Rossum <guido@python.org>
parents:
14602
diff
changeset
|
182 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
|
183 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
|
184 Invalid |
|
e57f93ae4fe9
Document the -W option as best as I can.
Guido van Rossum <guido@python.org>
parents:
14602
diff
changeset
|
185 .B \-W |
|
e57f93ae4fe9
Document the -W option as best as I can.
Guido van Rossum <guido@python.org>
parents:
14602
diff
changeset
|
186 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
|
187 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
|
188 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
|
189 .I warnings |
|
e57f93ae4fe9
Document the -W option as best as I can.
Guido van Rossum <guido@python.org>
parents:
14602
diff
changeset
|
190 module. |
|
e57f93ae4fe9
Document the -W option as best as I can.
Guido van Rossum <guido@python.org>
parents:
14602
diff
changeset
|
191 |
|
e57f93ae4fe9
Document the -W option as best as I can.
Guido van Rossum <guido@python.org>
parents:
14602
diff
changeset
|
192 The simplest form of |
|
e57f93ae4fe9
Document the -W option as best as I can.
Guido van Rossum <guido@python.org>
parents:
14602
diff
changeset
|
193 .I argument |
|
e57f93ae4fe9
Document the -W option as best as I can.
Guido van Rossum <guido@python.org>
parents:
14602
diff
changeset
|
194 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
|
195 .I action |
|
e57f93ae4fe9
Document the -W option as best as I can.
Guido van Rossum <guido@python.org>
parents:
14602
diff
changeset
|
196 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
|
197 .B ignore |
|
e57f93ae4fe9
Document the -W option as best as I can.
Guido van Rossum <guido@python.org>
parents:
14602
diff
changeset
|
198 to ignore all warnings; |
|
e57f93ae4fe9
Document the -W option as best as I can.
Guido van Rossum <guido@python.org>
parents:
14602
diff
changeset
|
199 .B default |
|
e57f93ae4fe9
Document the -W option as best as I can.
Guido van Rossum <guido@python.org>
parents:
14602
diff
changeset
|
200 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
|
201 per source line); |
|
e57f93ae4fe9
Document the -W option as best as I can.
Guido van Rossum <guido@python.org>
parents:
14602
diff
changeset
|
202 .B all |
|
e57f93ae4fe9
Document the -W option as best as I can.
Guido van Rossum <guido@python.org>
parents:
14602
diff
changeset
|
203 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
|
204 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
|
205 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
|
206 .B module |
|
e57f93ae4fe9
Document the -W option as best as I can.
Guido van Rossum <guido@python.org>
parents:
14602
diff
changeset
|
207 to print each warning only only the first time it occurs in each |
|
e57f93ae4fe9
Document the -W option as best as I can.
Guido van Rossum <guido@python.org>
parents:
14602
diff
changeset
|
208 module; |
|
e57f93ae4fe9
Document the -W option as best as I can.
Guido van Rossum <guido@python.org>
parents:
14602
diff
changeset
|
209 .B once |
|
e57f93ae4fe9
Document the -W option as best as I can.
Guido van Rossum <guido@python.org>
parents:
14602
diff
changeset
|
210 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
|
211 .B error |
|
e57f93ae4fe9
Document the -W option as best as I can.
Guido van Rossum <guido@python.org>
parents:
14602
diff
changeset
|
212 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
|
213 |
|
e57f93ae4fe9
Document the -W option as best as I can.
Guido van Rossum <guido@python.org>
parents:
14602
diff
changeset
|
214 The full form of |
|
e57f93ae4fe9
Document the -W option as best as I can.
Guido van Rossum <guido@python.org>
parents:
14602
diff
changeset
|
215 .I argument |
|
e57f93ae4fe9
Document the -W option as best as I can.
Guido van Rossum <guido@python.org>
parents:
14602
diff
changeset
|
216 is |
|
e57f93ae4fe9
Document the -W option as best as I can.
Guido van Rossum <guido@python.org>
parents:
14602
diff
changeset
|
217 .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
|
218 Here, |
|
e57f93ae4fe9
Document the -W option as best as I can.
Guido van Rossum <guido@python.org>
parents:
14602
diff
changeset
|
219 .I action |
|
e57f93ae4fe9
Document the -W option as best as I can.
Guido van Rossum <guido@python.org>
parents:
14602
diff
changeset
|
220 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
|
221 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
|
222 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
|
223 .I message |
|
e57f93ae4fe9
Document the -W option as best as I can.
Guido van Rossum <guido@python.org>
parents:
14602
diff
changeset
|
224 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
|
225 case-insensitive. The |
|
e57f93ae4fe9
Document the -W option as best as I can.
Guido van Rossum <guido@python.org>
parents:
14602
diff
changeset
|
226 .I category |
|
e57f93ae4fe9
Document the -W option as best as I can.
Guido van Rossum <guido@python.org>
parents:
14602
diff
changeset
|
227 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
|
228 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
|
229 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
|
230 be given. The |
|
e57f93ae4fe9
Document the -W option as best as I can.
Guido van Rossum <guido@python.org>
parents:
14602
diff
changeset
|
231 .I module |
|
e57f93ae4fe9
Document the -W option as best as I can.
Guido van Rossum <guido@python.org>
parents:
14602
diff
changeset
|
232 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
|
233 case-sensitive. The |
|
e57f93ae4fe9
Document the -W option as best as I can.
Guido van Rossum <guido@python.org>
parents:
14602
diff
changeset
|
234 .I line |
|
e57f93ae4fe9
Document the -W option as best as I can.
Guido van Rossum <guido@python.org>
parents:
14602
diff
changeset
|
235 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
|
236 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
|
237 .TP |
|
19739
8d2c7436b9d2
Document -Q. Move arguments around to be in strict alphabetical
Guido van Rossum <guido@python.org>
parents:
18844
diff
changeset
|
238 .B \-x |
|
8d2c7436b9d2
Document -Q. Move arguments around to be in strict alphabetical
Guido van Rossum <guido@python.org>
parents:
18844
diff
changeset
|
239 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
|
240 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
|
241 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
|
242 .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
|
243 .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
|
244 Warn about Python 3.x incompatibilities that 2to3 cannot trivially fix. |
| 1529 | 245 .SH INTERPRETER INTERFACE |
| 246 The interpreter interface resembles that of the UNIX shell: when | |
| 247 called with standard input connected to a tty device, it prompts for | |
| 248 commands and executes them until an EOF is read; when called with a | |
| 249 file name argument or with a file as standard input, it reads and | |
| 250 executes a | |
| 251 .I script | |
| 252 from that file; | |
| 253 when called with | |
| 254 .B \-c | |
| 255 .I command, | |
| 256 it executes the Python statement(s) given as | |
| 257 .I command. | |
| 258 Here | |
| 259 .I command | |
| 260 may contain multiple statements separated by newlines. | |
| 261 Leading whitespace is significant in Python statements! | |
|
34779
997b255e1ccc
fix two typos in python(1)
Matthias Klose <doko@ubuntu.com>
parents:
33685
diff
changeset
|
262 In non-interactive mode, the entire input is parsed before it is |
| 1529 | 263 executed. |
| 264 .PP | |
| 265 If available, the script name and additional arguments thereafter are | |
| 266 passed to the script in the Python variable | |
| 267 .I sys.argv , | |
| 268 which is a list of strings (you must first | |
| 269 .I import sys | |
| 270 to be able to access it). | |
| 271 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
|
272 .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
|
273 is an empty string; if |
| 1529 | 274 .B \-c |
| 275 is used, | |
| 276 .I sys.argv[0] | |
| 277 contains the string | |
| 278 .I '-c'. | |
|
3875
2838db83d0ed
Got rid of all references to stdwin.
Guido van Rossum <guido@python.org>
parents:
2068
diff
changeset
|
279 Note that options interpreted by the Python interpreter itself |
| 1529 | 280 are not placed in |
| 281 .I sys.argv. | |
| 282 .PP | |
| 283 In interactive mode, the primary prompt is `>>>'; the second prompt | |
| 284 (which appears when a command is not complete) is `...'. | |
| 285 The prompts can be changed by assignment to | |
| 286 .I sys.ps1 | |
| 287 or | |
| 288 .I sys.ps2. | |
| 289 The interpreter quits when it reads an EOF at a prompt. | |
| 290 When an unhandled exception occurs, a stack trace is printed and | |
| 291 control returns to the primary prompt; in non-interactive mode, the | |
| 292 interpreter exits after printing the stack trace. | |
| 293 The interrupt signal raises the | |
| 294 .I Keyboard\%Interrupt | |
| 295 exception; other UNIX signals are not caught (except that SIGPIPE is | |
| 296 sometimes ignored, in favor of the | |
| 297 .I IOError | |
| 298 exception). Error messages are written to stderr. | |
| 299 .SH FILES AND DIRECTORIES | |
| 300 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
|
301 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
|
302 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
|
303 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
|
304 .IP \fI${exec_prefix}/bin/python\fP |
| 1529 | 305 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
|
306 .PP |
|
96501cc3a663
Various updates, mostly to add information to the SEE ALSO and
Fred Drake <fdrake@acm.org>
parents:
7968
diff
changeset
|
307 .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
|
308 .br |
|
96501cc3a663
Various updates, mostly to add information to the SEE ALSO and
Fred Drake <fdrake@acm.org>
parents:
7968
diff
changeset
|
309 .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
|
310 .RS |
|
96501cc3a663
Various updates, mostly to add information to the SEE ALSO and
Fred Drake <fdrake@acm.org>
parents:
7968
diff
changeset
|
311 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
|
312 modules. |
|
96501cc3a663
Various updates, mostly to add information to the SEE ALSO and
Fred Drake <fdrake@acm.org>
parents:
7968
diff
changeset
|
313 .RE |
|
96501cc3a663
Various updates, mostly to add information to the SEE ALSO and
Fred Drake <fdrake@acm.org>
parents:
7968
diff
changeset
|
314 .PP |
|
96501cc3a663
Various updates, mostly to add information to the SEE ALSO and
Fred Drake <fdrake@acm.org>
parents:
7968
diff
changeset
|
315 .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
|
316 .br |
|
96501cc3a663
Various updates, mostly to add information to the SEE ALSO and
Fred Drake <fdrake@acm.org>
parents:
7968
diff
changeset
|
317 .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
|
318 .RS |
|
96501cc3a663
Various updates, mostly to add information to the SEE ALSO and
Fred Drake <fdrake@acm.org>
parents:
7968
diff
changeset
|
319 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
|
320 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
|
321 interpreter. |
|
96501cc3a663
Various updates, mostly to add information to the SEE ALSO and
Fred Drake <fdrake@acm.org>
parents:
7968
diff
changeset
|
322 .RE |
|
96501cc3a663
Various updates, mostly to add information to the SEE ALSO and
Fred Drake <fdrake@acm.org>
parents:
7968
diff
changeset
|
323 .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
|
324 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
|
325 not used by default or by most applications. |
| 1529 | 326 .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
|
327 .IP PYTHONHOME |
|
4333775b55fd
Brought up to date with new options and env vars.
Guido van Rossum <guido@python.org>
parents:
5876
diff
changeset
|
328 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
|
329 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
|
330 ${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
|
331 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
|
332 \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
|
333 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
|
334 for these, set $PYTHONHOME to ${prefix}:${exec_prefix}. |
| 1529 | 335 .IP PYTHONPATH |
| 336 Augments the default search path for module files. | |
| 337 The format is the same as the shell's $PATH: one or more directory | |
| 338 pathnames separated by colons. | |
|
34779
997b255e1ccc
fix two typos in python(1)
Matthias Klose <doko@ubuntu.com>
parents:
33685
diff
changeset
|
339 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
|
340 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
|
341 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
|
342 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
|
343 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
|
344 inserted in the path in front of $PYTHONPATH. |
| 1529 | 345 The search path can be manipulated from within a Python program as the |
| 346 variable | |
| 347 .I sys.path . | |
| 348 .IP PYTHONSTARTUP | |
| 349 If this is the name of a readable file, the Python commands in that | |
| 350 file are executed before the first prompt is displayed in interactive | |
| 351 mode. | |
| 352 The file is executed in the same name space where interactive commands | |
| 353 are executed so that objects defined or imported in it can be used | |
| 354 without qualification in the interactive session. | |
| 355 You can also change the prompts | |
| 356 .I sys.ps1 | |
| 357 and | |
| 358 .I sys.ps2 | |
| 359 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
|
360 .IP PYTHONY2K |
|
045f55135ad0
Document the PYTHONY2K environment variable that had been left out of this
Fred Drake <fdrake@acm.org>
parents:
18808
diff
changeset
|
361 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
|
362 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
|
363 2-digit years are converted based on rules described in the \fItime\fP |
| 23406 | 364 module documentation. |
|
20401
b74610c92d8b
SF patch #467455 : Enhanced environment variables, by Toby Dickenson.
Guido van Rossum <guido@python.org>
parents:
19740
diff
changeset
|
365 .IP PYTHONOPTIMIZE |
|
b74610c92d8b
SF patch #467455 : Enhanced environment variables, by Toby Dickenson.
Guido van Rossum <guido@python.org>
parents:
19740
diff
changeset
|
366 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
|
367 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
|
368 specifying \fB\-O\fP multiple times. |
| 1529 | 369 .IP PYTHONDEBUG |
| 370 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
|
371 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
|
372 specifying \fB\-d\fP multiple times. |
| 1529 | 373 .IP PYTHONINSPECT |
| 374 If this is set to a non-empty string it is equivalent to specifying | |
| 375 the \fB\-i\fP option. | |
|
1601
57b9b77da21b
Documented -u (unbuffered), undocumented -k (killprint)
Guido van Rossum <guido@python.org>
parents:
1559
diff
changeset
|
376 .IP PYTHONUNBUFFERED |
| 1529 | 377 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
|
378 the \fB\-u\fP option. |
| 1529 | 379 .IP PYTHONVERBOSE |
| 380 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
|
381 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
|
382 specifying \fB\-v\fP multiple times. |
| 1529 | 383 .SH AUTHOR |
|
33684
3e6f56e8104a
Take out Guido's name and put in the PSF
Andrew M. Kuchling <amk@amk.ca>
parents:
33683
diff
changeset
|
384 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
|
385 .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
|
386 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
|
387 .br |
| 33683 | 388 Documentation: http://docs.python.org/ |
|
3875
2838db83d0ed
Got rid of all references to stdwin.
Guido van Rossum <guido@python.org>
parents:
2068
diff
changeset
|
389 .br |
|
18844
045f55135ad0
Document the PYTHONY2K environment variable that had been left out of this
Fred Drake <fdrake@acm.org>
parents:
18808
diff
changeset
|
390 Community website: http://starship.python.net/ |
|
14360
d1d5e2dc29db
Clean up a bit. Drop -X option, update date, remove documentation
Guido van Rossum <guido@python.org>
parents:
13255
diff
changeset
|
391 .br |
| 33683 | 392 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
|
393 .br |
|
18844
045f55135ad0
Document the PYTHONY2K environment variable that had been left out of this
Fred Drake <fdrake@acm.org>
parents:
18808
diff
changeset
|
394 FTP: ftp://ftp.python.org/pub/python/ |
|
14360
d1d5e2dc29db
Clean up a bit. Drop -X option, update date, remove documentation
Guido van Rossum <guido@python.org>
parents:
13255
diff
changeset
|
395 .br |
|
18844
045f55135ad0
Document the PYTHONY2K environment variable that had been left out of this
Fred Drake <fdrake@acm.org>
parents:
18808
diff
changeset
|
396 Module repository: http://www.vex.net/parnassus/ |
|
3875
2838db83d0ed
Got rid of all references to stdwin.
Guido van Rossum <guido@python.org>
parents:
2068
diff
changeset
|
397 .br |
|
18844
045f55135ad0
Document the PYTHONY2K environment variable that had been left out of this
Fred Drake <fdrake@acm.org>
parents:
18808
diff
changeset
|
398 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
|
399 .SH LICENSING |
|
d1d5e2dc29db
Clean up a bit. Drop -X option, update date, remove documentation
Guido van Rossum <guido@python.org>
parents:
13255
diff
changeset
|
400 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
|
401 "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
|
402 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
|
403 DISCLAIMER OF ALL WARRANTIES. |
