Guido van Rossum | 97bac53 | 2001-09-05 18:57:51 +0000 | [diff] [blame] | 1 | .TH PYTHON "1" "$Date$" |
Andrew M. Kuchling | 3afe4f3 | 2004-10-07 12:30:54 +0000 | [diff] [blame] | 2 | |
Benjamin Peterson | 5f28b7b | 2009-03-26 21:49:58 +0000 | [diff] [blame] | 3 | .\" To view this file while editing, run it through groff: |
| 4 | .\" groff -Tascii -man python.man | less |
Andrew M. Kuchling | 3afe4f3 | 2004-10-07 12:30:54 +0000 | [diff] [blame] | 5 | |
Guido van Rossum | a7925f1 | 1994-01-26 10:20:16 +0000 | [diff] [blame] | 6 | .SH NAME |
| 7 | python \- an interpreted, interactive, object-oriented programming language |
| 8 | .SH SYNOPSIS |
| 9 | .B python |
| 10 | [ |
Matthias Klose | c8b16f8 | 2010-01-31 16:14:37 +0000 | [diff] [blame] | 11 | .B \-B |
| 12 | ] |
| 13 | [ |
Guido van Rossum | a7925f1 | 1994-01-26 10:20:16 +0000 | [diff] [blame] | 14 | .B \-d |
| 15 | ] |
| 16 | [ |
Guido van Rossum | b674baf | 2001-09-05 18:55:34 +0000 | [diff] [blame] | 17 | .B \-E |
| 18 | ] |
| 19 | [ |
| 20 | .B \-h |
| 21 | ] |
| 22 | [ |
Guido van Rossum | a7925f1 | 1994-01-26 10:20:16 +0000 | [diff] [blame] | 23 | .B \-i |
| 24 | ] |
| 25 | [ |
Andrew M. Kuchling | 166e625 | 2004-10-07 12:04:50 +0000 | [diff] [blame] | 26 | .B \-m |
| 27 | .I module-name |
| 28 | ] |
Georg Brandl | 9d87119 | 2010-12-04 10:47:18 +0000 | [diff] [blame] | 29 | [ |
| 30 | .B \-q |
| 31 | ] |
Guido van Rossum | b674baf | 2001-09-05 18:55:34 +0000 | [diff] [blame] | 32 | .br |
| 33 | [ |
Matthias Klose | c8b16f8 | 2010-01-31 16:14:37 +0000 | [diff] [blame] | 34 | .B \-O |
| 35 | ] |
| 36 | [ |
R David Murray | 9c4f09d | 2011-05-01 11:13:56 -0400 | [diff] [blame] | 37 | .B \-OO |
Matthias Klose | c8b16f8 | 2010-01-31 16:14:37 +0000 | [diff] [blame] | 38 | ] |
| 39 | [ |
Guido van Rossum | b674baf | 2001-09-05 18:55:34 +0000 | [diff] [blame] | 40 | .B -Q |
| 41 | .I argument |
Guido van Rossum | 4cf4de5 | 1997-09-08 04:06:15 +0000 | [diff] [blame] | 42 | ] |
| 43 | [ |
Matthias Klose | c8b16f8 | 2010-01-31 16:14:37 +0000 | [diff] [blame] | 44 | .B \-s |
| 45 | ] |
| 46 | [ |
Guido van Rossum | b674baf | 2001-09-05 18:55:34 +0000 | [diff] [blame] | 47 | .B \-S |
Neil Schemenauer | 7d4bb9f | 2001-07-23 16:30:27 +0000 | [diff] [blame] | 48 | ] |
| 49 | [ |
Guido van Rossum | ef5bca3 | 1994-05-03 14:15:32 +0000 | [diff] [blame] | 50 | .B \-u |
Guido van Rossum | a7925f1 | 1994-01-26 10:20:16 +0000 | [diff] [blame] | 51 | ] |
Guido van Rossum | b674baf | 2001-09-05 18:55:34 +0000 | [diff] [blame] | 52 | .br |
| 53 | [ |
Guido van Rossum | a7925f1 | 1994-01-26 10:20:16 +0000 | [diff] [blame] | 54 | .B \-v |
| 55 | ] |
Guido van Rossum | 07c44c7 | 1998-04-10 19:46:00 +0000 | [diff] [blame] | 56 | [ |
Barry Warsaw | 6456937 | 2000-09-15 18:39:09 +0000 | [diff] [blame] | 57 | .B \-V |
| 58 | ] |
Guido van Rossum | 1378c32 | 2000-12-19 03:21:54 +0000 | [diff] [blame] | 59 | [ |
| 60 | .B \-W |
| 61 | .I argument |
| 62 | ] |
Guido van Rossum | b674baf | 2001-09-05 18:55:34 +0000 | [diff] [blame] | 63 | [ |
| 64 | .B \-x |
| 65 | ] |
Matthias Klose | c8b16f8 | 2010-01-31 16:14:37 +0000 | [diff] [blame] | 66 | [ |
| 67 | .B \-? |
| 68 | ] |
Guido van Rossum | 4cf4de5 | 1997-09-08 04:06:15 +0000 | [diff] [blame] | 69 | .br |
| 70 | [ |
Guido van Rossum | a7925f1 | 1994-01-26 10:20:16 +0000 | [diff] [blame] | 71 | .B \-c |
| 72 | .I command |
| 73 | | |
| 74 | .I script |
| 75 | | |
| 76 | \- |
| 77 | ] |
| 78 | [ |
| 79 | .I arguments |
| 80 | ] |
| 81 | .SH DESCRIPTION |
| 82 | Python is an interpreted, interactive, object-oriented programming |
| 83 | language that combines remarkable power with very clear syntax. |
| 84 | For an introduction to programming in Python you are referred to the |
| 85 | Python Tutorial. |
| 86 | The Python Library Reference documents built-in and standard types, |
| 87 | constants, functions and modules. |
| 88 | Finally, the Python Reference Manual describes the syntax and |
| 89 | semantics of the core language in (perhaps too) much detail. |
Guido van Rossum | f4a090d | 2000-09-01 20:36:34 +0000 | [diff] [blame] | 90 | (These documents may be located via the |
| 91 | .B "INTERNET RESOURCES" |
Fred Drake | 4c9be9d | 1999-08-20 13:10:20 +0000 | [diff] [blame] | 92 | below; they may be installed on your system as well.) |
Guido van Rossum | a7925f1 | 1994-01-26 10:20:16 +0000 | [diff] [blame] | 93 | .PP |
| 94 | Python's basic power can be extended with your own modules written in |
| 95 | C or C++. |
Guido van Rossum | 74faed2 | 1996-07-30 19:27:05 +0000 | [diff] [blame] | 96 | On most systems such modules may be dynamically loaded. |
Guido van Rossum | a7925f1 | 1994-01-26 10:20:16 +0000 | [diff] [blame] | 97 | Python is also adaptable as an extension language for existing |
| 98 | applications. |
| 99 | See the internal documentation for hints. |
Andrew M. Kuchling | 88717f4 | 2001-04-05 14:50:40 +0000 | [diff] [blame] | 100 | .PP |
| 101 | Documentation for installed Python modules and packages can be |
| 102 | viewed by running the |
| 103 | .B pydoc |
| 104 | program. |
Guido van Rossum | a7925f1 | 1994-01-26 10:20:16 +0000 | [diff] [blame] | 105 | .SH COMMAND LINE OPTIONS |
| 106 | .TP |
Matthias Klose | c8b16f8 | 2010-01-31 16:14:37 +0000 | [diff] [blame] | 107 | .B \-B |
| 108 | Don't write |
| 109 | .I .py[co] |
| 110 | files on import. See also PYTHONDONTWRITEBYTECODE. |
| 111 | .TP |
Guido van Rossum | b674baf | 2001-09-05 18:55:34 +0000 | [diff] [blame] | 112 | .BI "\-c " command |
| 113 | Specify the command to execute (see next section). |
| 114 | This terminates the option list (following options are passed as |
| 115 | arguments to the command). |
| 116 | .TP |
Guido van Rossum | a7925f1 | 1994-01-26 10:20:16 +0000 | [diff] [blame] | 117 | .B \-d |
| 118 | Turn on parser debugging output (for wizards only, depending on |
| 119 | compilation options). |
Guido van Rossum | 9f65ae0 | 1994-02-23 09:10:27 +0000 | [diff] [blame] | 120 | .TP |
Guido van Rossum | b674baf | 2001-09-05 18:55:34 +0000 | [diff] [blame] | 121 | .B \-E |
| 122 | Ignore environment variables like PYTHONPATH and PYTHONHOME that modify |
| 123 | the behavior of the interpreter. |
| 124 | .TP |
Matthias Klose | c8b16f8 | 2010-01-31 16:14:37 +0000 | [diff] [blame] | 125 | .B \-h ", " \-? ", "\-\-help |
Guido van Rossum | b674baf | 2001-09-05 18:55:34 +0000 | [diff] [blame] | 126 | Prints the usage for the interpreter executable and exits. |
| 127 | .TP |
Guido van Rossum | a7925f1 | 1994-01-26 10:20:16 +0000 | [diff] [blame] | 128 | .B \-i |
| 129 | When a script is passed as first argument or the \fB\-c\fP option is |
| 130 | used, enter interactive mode after executing the script or the |
Guido van Rossum | 9f65ae0 | 1994-02-23 09:10:27 +0000 | [diff] [blame] | 131 | command. It does not read the $PYTHONSTARTUP file. This can be |
| 132 | useful to inspect global variables or a stack trace when a script |
| 133 | raises an exception. |
Guido van Rossum | a7925f1 | 1994-01-26 10:20:16 +0000 | [diff] [blame] | 134 | .TP |
Andrew M. Kuchling | 166e625 | 2004-10-07 12:04:50 +0000 | [diff] [blame] | 135 | .BI "\-m " module-name |
| 136 | Searches |
| 137 | .I sys.path |
| 138 | for the named module and runs the corresponding |
| 139 | .I .py |
| 140 | file as a script. |
| 141 | .TP |
Guido van Rossum | 4cf4de5 | 1997-09-08 04:06:15 +0000 | [diff] [blame] | 142 | .B \-O |
| 143 | Turn on basic optimizations. This changes the filename extension for |
| 144 | compiled (bytecode) files from |
| 145 | .I .pyc |
Fred Drake | 4c9be9d | 1999-08-20 13:10:20 +0000 | [diff] [blame] | 146 | to \fI.pyo\fP. Given twice, causes docstrings to be discarded. |
Guido van Rossum | 4cf4de5 | 1997-09-08 04:06:15 +0000 | [diff] [blame] | 147 | .TP |
R David Murray | 9c4f09d | 2011-05-01 11:13:56 -0400 | [diff] [blame] | 148 | .B \-OO |
Matthias Klose | c8b16f8 | 2010-01-31 16:14:37 +0000 | [diff] [blame] | 149 | Discard docstrings in addition to the \fB-O\fP optimizations. |
| 150 | .TP |
Georg Brandl | 9d87119 | 2010-12-04 10:47:18 +0000 | [diff] [blame] | 151 | .B \-q |
| 152 | Do not print the version and copyright messages. These messages are |
| 153 | also suppressed in non-interactive mode. |
| 154 | .TP |
Guido van Rossum | b674baf | 2001-09-05 18:55:34 +0000 | [diff] [blame] | 155 | .BI "\-Q " argument |
| 156 | Division control; see PEP 238. The argument must be one of "old" (the |
| 157 | default, int/int and long/long return an int or long), "new" (new |
| 158 | division semantics, i.e. int/int and long/long returns a float), |
| 159 | "warn" (old division semantics with a warning for int/int and |
| 160 | long/long), or "warnall" (old division semantics with a warning for |
| 161 | all use of the division operator). For a use of "warnall", see the |
| 162 | Tools/scripts/fixdiv.py script. |
| 163 | .TP |
Matthias Klose | c8b16f8 | 2010-01-31 16:14:37 +0000 | [diff] [blame] | 164 | .B \-s |
| 165 | Don't add user site directory to sys.path. |
| 166 | .TP |
Guido van Rossum | 4cf4de5 | 1997-09-08 04:06:15 +0000 | [diff] [blame] | 167 | .B \-S |
| 168 | Disable the import of the module |
| 169 | .I site |
| 170 | and the site-dependent manipulations of |
| 171 | .I sys.path |
| 172 | that it entails. |
| 173 | .TP |
Guido van Rossum | ef5bca3 | 1994-05-03 14:15:32 +0000 | [diff] [blame] | 174 | .B \-u |
Georg Brandl | 379299c | 2010-04-02 08:47:07 +0000 | [diff] [blame] | 175 | Force the binary I/O layers of stdin, stdout and stderr to be unbuffered. |
| 176 | The text I/O layer will still be line-buffered. |
| 177 | .\" Note that there is internal buffering in readlines() and |
| 178 | .\" file-object iterators ("for line in sys.stdin") which is not |
| 179 | .\" influenced by this option. To work around this, you will want to use |
| 180 | .\" "sys.stdin.readline()" inside a "while 1:" loop. |
Guido van Rossum | a7925f1 | 1994-01-26 10:20:16 +0000 | [diff] [blame] | 181 | .TP |
| 182 | .B \-v |
| 183 | Print a message each time a module is initialized, showing the place |
Fred Drake | 4c9be9d | 1999-08-20 13:10:20 +0000 | [diff] [blame] | 184 | (filename or built-in module) from which it is loaded. When given |
| 185 | twice, print a message for each file that is checked for when |
| 186 | searching for a module. Also provides information on module cleanup |
| 187 | at exit. |
Guido van Rossum | a7925f1 | 1994-01-26 10:20:16 +0000 | [diff] [blame] | 188 | .TP |
Matthias Klose | c8b16f8 | 2010-01-31 16:14:37 +0000 | [diff] [blame] | 189 | .B \-V ", " \-\-version |
Barry Warsaw | 6456937 | 2000-09-15 18:39:09 +0000 | [diff] [blame] | 190 | Prints the Python version number of the executable and exits. |
| 191 | .TP |
Guido van Rossum | 1378c32 | 2000-12-19 03:21:54 +0000 | [diff] [blame] | 192 | .BI "\-W " argument |
| 193 | Warning control. Python sometimes prints warning message to |
| 194 | .IR sys.stderr . |
| 195 | A typical warning message has the following form: |
| 196 | .IB file ":" line ": " category ": " message. |
| 197 | By default, each warning is printed once for each source line where it |
| 198 | occurs. This option controls how often warnings are printed. |
| 199 | Multiple |
| 200 | .B \-W |
| 201 | options may be given; when a warning matches more than one |
| 202 | option, the action for the last matching option is performed. |
| 203 | Invalid |
| 204 | .B \-W |
| 205 | options are ignored (a warning message is printed about invalid |
| 206 | options when the first warning is issued). Warnings can also be |
| 207 | controlled from within a Python program using the |
| 208 | .I warnings |
| 209 | module. |
| 210 | |
| 211 | The simplest form of |
| 212 | .I argument |
| 213 | is one of the following |
| 214 | .I action |
| 215 | strings (or a unique abbreviation): |
| 216 | .B ignore |
| 217 | to ignore all warnings; |
| 218 | .B default |
| 219 | to explicitly request the default behavior (printing each warning once |
| 220 | per source line); |
| 221 | .B all |
| 222 | to print a warning each time it occurs (this may generate many |
| 223 | messages if a warning is triggered repeatedly for the same source |
Fred Drake | bd2e3b0 | 2001-07-26 21:25:58 +0000 | [diff] [blame] | 224 | line, such as inside a loop); |
Guido van Rossum | 1378c32 | 2000-12-19 03:21:54 +0000 | [diff] [blame] | 225 | .B module |
Georg Brandl | eeb575f | 2009-06-24 06:42:05 +0000 | [diff] [blame] | 226 | to print each warning only the first time it occurs in each |
Guido van Rossum | 1378c32 | 2000-12-19 03:21:54 +0000 | [diff] [blame] | 227 | module; |
| 228 | .B once |
| 229 | to print each warning only the first time it occurs in the program; or |
| 230 | .B error |
| 231 | to raise an exception instead of printing a warning message. |
| 232 | |
| 233 | The full form of |
| 234 | .I argument |
| 235 | is |
| 236 | .IB action : message : category : module : line. |
| 237 | Here, |
| 238 | .I action |
| 239 | is as explained above but only applies to messages that match the |
| 240 | remaining fields. Empty fields match all values; trailing empty |
| 241 | fields may be omitted. The |
| 242 | .I message |
| 243 | field matches the start of the warning message printed; this match is |
| 244 | case-insensitive. The |
| 245 | .I category |
| 246 | field matches the warning category. This must be a class name; the |
| 247 | match test whether the actual warning category of the message is a |
| 248 | subclass of the specified warning category. The full class name must |
| 249 | be given. The |
| 250 | .I module |
| 251 | field matches the (fully-qualified) module name; this match is |
| 252 | case-sensitive. The |
| 253 | .I line |
| 254 | field matches the line number, where zero matches all line numbers and |
| 255 | is thus equivalent to an omitted line number. |
| 256 | .TP |
Guido van Rossum | b674baf | 2001-09-05 18:55:34 +0000 | [diff] [blame] | 257 | .B \-x |
| 258 | Skip the first line of the source. This is intended for a DOS |
| 259 | specific hack only. Warning: the line numbers in error messages will |
| 260 | be off by one! |
Guido van Rossum | a7925f1 | 1994-01-26 10:20:16 +0000 | [diff] [blame] | 261 | .SH INTERPRETER INTERFACE |
| 262 | The interpreter interface resembles that of the UNIX shell: when |
| 263 | called with standard input connected to a tty device, it prompts for |
| 264 | commands and executes them until an EOF is read; when called with a |
| 265 | file name argument or with a file as standard input, it reads and |
| 266 | executes a |
| 267 | .I script |
| 268 | from that file; |
| 269 | when called with |
| 270 | .B \-c |
| 271 | .I command, |
| 272 | it executes the Python statement(s) given as |
| 273 | .I command. |
| 274 | Here |
| 275 | .I command |
| 276 | may contain multiple statements separated by newlines. |
| 277 | Leading whitespace is significant in Python statements! |
Matthias Klose | 31a58df | 2005-03-20 14:16:03 +0000 | [diff] [blame] | 278 | In non-interactive mode, the entire input is parsed before it is |
Guido van Rossum | a7925f1 | 1994-01-26 10:20:16 +0000 | [diff] [blame] | 279 | executed. |
| 280 | .PP |
| 281 | If available, the script name and additional arguments thereafter are |
| 282 | passed to the script in the Python variable |
| 283 | .I sys.argv , |
| 284 | which is a list of strings (you must first |
| 285 | .I import sys |
| 286 | to be able to access it). |
| 287 | If no script name is given, |
Guido van Rossum | f4a090d | 2000-09-01 20:36:34 +0000 | [diff] [blame] | 288 | .I sys.argv[0] |
| 289 | is an empty string; if |
Guido van Rossum | a7925f1 | 1994-01-26 10:20:16 +0000 | [diff] [blame] | 290 | .B \-c |
| 291 | is used, |
| 292 | .I sys.argv[0] |
| 293 | contains the string |
| 294 | .I '-c'. |
Guido van Rossum | 74faed2 | 1996-07-30 19:27:05 +0000 | [diff] [blame] | 295 | Note that options interpreted by the Python interpreter itself |
Guido van Rossum | a7925f1 | 1994-01-26 10:20:16 +0000 | [diff] [blame] | 296 | are not placed in |
| 297 | .I sys.argv. |
| 298 | .PP |
| 299 | In interactive mode, the primary prompt is `>>>'; the second prompt |
| 300 | (which appears when a command is not complete) is `...'. |
| 301 | The prompts can be changed by assignment to |
| 302 | .I sys.ps1 |
| 303 | or |
| 304 | .I sys.ps2. |
| 305 | The interpreter quits when it reads an EOF at a prompt. |
| 306 | When an unhandled exception occurs, a stack trace is printed and |
| 307 | control returns to the primary prompt; in non-interactive mode, the |
| 308 | interpreter exits after printing the stack trace. |
| 309 | The interrupt signal raises the |
| 310 | .I Keyboard\%Interrupt |
| 311 | exception; other UNIX signals are not caught (except that SIGPIPE is |
| 312 | sometimes ignored, in favor of the |
| 313 | .I IOError |
| 314 | exception). Error messages are written to stderr. |
| 315 | .SH FILES AND DIRECTORIES |
| 316 | These are subject to difference depending on local installation |
Fred Drake | 4c9be9d | 1999-08-20 13:10:20 +0000 | [diff] [blame] | 317 | conventions; ${prefix} and ${exec_prefix} are installation-dependent |
| 318 | and should be interpreted as for GNU software; they may be the same. |
| 319 | The default for both is \fI/usr/local\fP. |
| 320 | .IP \fI${exec_prefix}/bin/python\fP |
Guido van Rossum | a7925f1 | 1994-01-26 10:20:16 +0000 | [diff] [blame] | 321 | Recommended location of the interpreter. |
Fred Drake | 4c9be9d | 1999-08-20 13:10:20 +0000 | [diff] [blame] | 322 | .PP |
| 323 | .I ${prefix}/lib/python<version> |
| 324 | .br |
| 325 | .I ${exec_prefix}/lib/python<version> |
| 326 | .RS |
| 327 | Recommended locations of the directories containing the standard |
| 328 | modules. |
| 329 | .RE |
| 330 | .PP |
| 331 | .I ${prefix}/include/python<version> |
| 332 | .br |
| 333 | .I ${exec_prefix}/include/python<version> |
| 334 | .RS |
| 335 | Recommended locations of the directories containing the include files |
| 336 | needed for developing Python extensions and embedding the |
| 337 | interpreter. |
| 338 | .RE |
Guido van Rossum | a7925f1 | 1994-01-26 10:20:16 +0000 | [diff] [blame] | 339 | .SH ENVIRONMENT VARIABLES |
Guido van Rossum | 4cf4de5 | 1997-09-08 04:06:15 +0000 | [diff] [blame] | 340 | .IP PYTHONHOME |
| 341 | Change the location of the standard Python libraries. By default, the |
Fred Drake | 4c9be9d | 1999-08-20 13:10:20 +0000 | [diff] [blame] | 342 | libraries are searched in ${prefix}/lib/python<version> and |
| 343 | ${exec_prefix}/lib/python<version>, where ${prefix} and ${exec_prefix} |
Guido van Rossum | 4cf4de5 | 1997-09-08 04:06:15 +0000 | [diff] [blame] | 344 | are installation-dependent directories, both defaulting to |
Fred Drake | 4c9be9d | 1999-08-20 13:10:20 +0000 | [diff] [blame] | 345 | \fI/usr/local\fP. When $PYTHONHOME is set to a single directory, its value |
| 346 | replaces both ${prefix} and ${exec_prefix}. To specify different values |
| 347 | for these, set $PYTHONHOME to ${prefix}:${exec_prefix}. |
Guido van Rossum | a7925f1 | 1994-01-26 10:20:16 +0000 | [diff] [blame] | 348 | .IP PYTHONPATH |
| 349 | Augments the default search path for module files. |
| 350 | The format is the same as the shell's $PATH: one or more directory |
| 351 | pathnames separated by colons. |
Matthias Klose | 31a58df | 2005-03-20 14:16:03 +0000 | [diff] [blame] | 352 | Non-existent directories are silently ignored. |
Guido van Rossum | 4cf4de5 | 1997-09-08 04:06:15 +0000 | [diff] [blame] | 353 | The default search path is installation dependent, but generally |
Fred Drake | 4c9be9d | 1999-08-20 13:10:20 +0000 | [diff] [blame] | 354 | begins with ${prefix}/lib/python<version> (see PYTHONHOME above). |
Guido van Rossum | 4cf4de5 | 1997-09-08 04:06:15 +0000 | [diff] [blame] | 355 | The default search path is always appended to $PYTHONPATH. |
Guido van Rossum | 74faed2 | 1996-07-30 19:27:05 +0000 | [diff] [blame] | 356 | If a script argument is given, the directory containing the script is |
| 357 | inserted in the path in front of $PYTHONPATH. |
Guido van Rossum | a7925f1 | 1994-01-26 10:20:16 +0000 | [diff] [blame] | 358 | The search path can be manipulated from within a Python program as the |
| 359 | variable |
| 360 | .I sys.path . |
| 361 | .IP PYTHONSTARTUP |
| 362 | If this is the name of a readable file, the Python commands in that |
| 363 | file are executed before the first prompt is displayed in interactive |
| 364 | mode. |
| 365 | The file is executed in the same name space where interactive commands |
| 366 | are executed so that objects defined or imported in it can be used |
| 367 | without qualification in the interactive session. |
| 368 | You can also change the prompts |
| 369 | .I sys.ps1 |
| 370 | and |
| 371 | .I sys.ps2 |
| 372 | in this file. |
Fred Drake | bd2e3b0 | 2001-07-26 21:25:58 +0000 | [diff] [blame] | 373 | .IP PYTHONY2K |
| 374 | Set this to a non-empty string to cause the \fItime\fP module to |
| 375 | require dates specified as strings to include 4-digit years, otherwise |
| 376 | 2-digit years are converted based on rules described in the \fItime\fP |
Andrew M. Kuchling | b2cb37f | 2002-05-09 14:33:18 +0000 | [diff] [blame] | 377 | module documentation. |
Guido van Rossum | 9abaf4d | 2001-10-12 22:17:56 +0000 | [diff] [blame] | 378 | .IP PYTHONOPTIMIZE |
| 379 | If this is set to a non-empty string it is equivalent to specifying |
| 380 | the \fB\-O\fP option. If set to an integer, it is equivalent to |
| 381 | specifying \fB\-O\fP multiple times. |
Guido van Rossum | a7925f1 | 1994-01-26 10:20:16 +0000 | [diff] [blame] | 382 | .IP PYTHONDEBUG |
| 383 | If this is set to a non-empty string it is equivalent to specifying |
Guido van Rossum | 9abaf4d | 2001-10-12 22:17:56 +0000 | [diff] [blame] | 384 | the \fB\-d\fP option. If set to an integer, it is equivalent to |
| 385 | specifying \fB\-d\fP multiple times. |
Matthias Klose | c8b16f8 | 2010-01-31 16:14:37 +0000 | [diff] [blame] | 386 | .IP PYTHONDONTWRITEBYTECODE |
| 387 | If this is set to a non-empty string it is equivalent to specifying |
| 388 | the \fB\-B\fP option (don't try to write |
| 389 | .I .py[co] |
| 390 | files). |
Guido van Rossum | a7925f1 | 1994-01-26 10:20:16 +0000 | [diff] [blame] | 391 | .IP PYTHONINSPECT |
| 392 | If this is set to a non-empty string it is equivalent to specifying |
| 393 | the \fB\-i\fP option. |
Benjamin Peterson | ee85a1d | 2010-10-13 22:20:15 +0000 | [diff] [blame] | 394 | .IP PYTHONIOENCODING |
| 395 | If this is set before running the interpreter, it overrides the encoding used |
| 396 | for stdin/stdout/stderr, in the syntax |
| 397 | .IB encodingname ":" errorhandler |
| 398 | The |
| 399 | .IB errorhandler |
| 400 | part is optional and has the same meaning as in str.encode. For stderr, the |
| 401 | .IB errorhandler |
| 402 | part is ignored; the handler will always be \'backslashreplace\'. |
Matthias Klose | c8b16f8 | 2010-01-31 16:14:37 +0000 | [diff] [blame] | 403 | .IP PYTHONNOUSERSITE |
Benjamin Peterson | ee85a1d | 2010-10-13 22:20:15 +0000 | [diff] [blame] | 404 | If this is set to a non-empty string it is equivalent to specifying the |
| 405 | \fB\-s\fP option (Don't add the user site directory to sys.path). |
Guido van Rossum | ef5bca3 | 1994-05-03 14:15:32 +0000 | [diff] [blame] | 406 | .IP PYTHONUNBUFFERED |
Guido van Rossum | a7925f1 | 1994-01-26 10:20:16 +0000 | [diff] [blame] | 407 | If this is set to a non-empty string it is equivalent to specifying |
Guido van Rossum | ef5bca3 | 1994-05-03 14:15:32 +0000 | [diff] [blame] | 408 | the \fB\-u\fP option. |
Guido van Rossum | a7925f1 | 1994-01-26 10:20:16 +0000 | [diff] [blame] | 409 | .IP PYTHONVERBOSE |
| 410 | If this is set to a non-empty string it is equivalent to specifying |
Guido van Rossum | 9abaf4d | 2001-10-12 22:17:56 +0000 | [diff] [blame] | 411 | the \fB\-v\fP option. If set to an integer, it is equivalent to |
| 412 | specifying \fB\-v\fP multiple times. |
Philip Jenvey | 0805ca3 | 2010-04-07 04:04:10 +0000 | [diff] [blame] | 413 | .IP PYTHONWARNINGS |
| 414 | If this is set to a comma-separated string it is equivalent to |
| 415 | specifying the \fB\-W\fP option for each separate value. |
Guido van Rossum | a7925f1 | 1994-01-26 10:20:16 +0000 | [diff] [blame] | 416 | .SH AUTHOR |
Andrew M. Kuchling | 6f59325 | 2004-10-07 12:27:31 +0000 | [diff] [blame] | 417 | The Python Software Foundation: http://www.python.org/psf |
Guido van Rossum | 74faed2 | 1996-07-30 19:27:05 +0000 | [diff] [blame] | 418 | .SH INTERNET RESOURCES |
Fred Drake | bd2e3b0 | 2001-07-26 21:25:58 +0000 | [diff] [blame] | 419 | Main website: http://www.python.org/ |
Guido van Rossum | 74faed2 | 1996-07-30 19:27:05 +0000 | [diff] [blame] | 420 | .br |
Benjamin Peterson | 6aa7c8c | 2009-09-13 02:23:12 +0000 | [diff] [blame] | 421 | Documentation: http://docs.python.org/py3k/ |
Guido van Rossum | f4a090d | 2000-09-01 20:36:34 +0000 | [diff] [blame] | 422 | .br |
Éric Araujo | a2b89e3 | 2011-11-29 16:36:17 +0100 | [diff] [blame] | 423 | Developer resources: http://docs.python.org/devguide/ |
Guido van Rossum | f4a090d | 2000-09-01 20:36:34 +0000 | [diff] [blame] | 424 | .br |
Benjamin Peterson | 25a8dd7 | 2009-09-13 02:22:00 +0000 | [diff] [blame] | 425 | Downloads: http://python.org/download/ |
Guido van Rossum | f4a090d | 2000-09-01 20:36:34 +0000 | [diff] [blame] | 426 | .br |
Benjamin Peterson | 25a8dd7 | 2009-09-13 02:22:00 +0000 | [diff] [blame] | 427 | Module repository: http://pypi.python.org/ |
Guido van Rossum | 74faed2 | 1996-07-30 19:27:05 +0000 | [diff] [blame] | 428 | .br |
Fred Drake | bd2e3b0 | 2001-07-26 21:25:58 +0000 | [diff] [blame] | 429 | Newsgroups: comp.lang.python, comp.lang.python.announce |
Guido van Rossum | f4a090d | 2000-09-01 20:36:34 +0000 | [diff] [blame] | 430 | .SH LICENSING |
| 431 | Python is distributed under an Open Source license. See the file |
| 432 | "LICENSE" in the Python source distribution for information on terms & |
| 433 | conditions for accessing and otherwise using Python and for a |
| 434 | DISCLAIMER OF ALL WARRANTIES. |