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