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