OLD | NEW |
1 :mod:`sys` --- System-specific parameters and functions | 1 :mod:`sys` --- System-specific parameters and functions |
2 ======================================================= | 2 ======================================================= |
3 | 3 |
4 .. module:: sys | 4 .. module:: sys |
5 :synopsis: Access system-specific parameters and functions. | 5 :synopsis: Access system-specific parameters and functions. |
6 | 6 |
7 | 7 |
8 This module provides access to some variables used or maintained by the | 8 This module provides access to some variables used or maintained by the |
9 interpreter and to functions that interact strongly with the interpreter. It is | 9 interpreter and to functions that interact strongly with the interpreter. It is |
10 always available. | 10 always available. |
(...skipping 581 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
592 .. data:: modules | 592 .. data:: modules |
593 | 593 |
594 This is a dictionary that maps module names to modules which have already bee
n | 594 This is a dictionary that maps module names to modules which have already bee
n |
595 loaded. This can be manipulated to force reloading of modules and other tric
ks. | 595 loaded. This can be manipulated to force reloading of modules and other tric
ks. |
596 | 596 |
597 | 597 |
598 .. data:: path | 598 .. data:: path |
599 | 599 |
600 .. index:: triple: module; search; path | 600 .. index:: triple: module; search; path |
601 | 601 |
602 A list of strings that specifies the search path for modules. Initialized fro
m | 602 A list of unicode strings that specifies the search path for modules. |
603 the environment variable :envvar:`PYTHONPATH`, plus an installation-dependent | 603 Initialized from the environment variable :envvar:`PYTHONPATH`, plus an |
604 default. | 604 installation-dependent default. |
605 | 605 |
606 As initialized upon program startup, the first item of this list, ``path[0]``
, | 606 As initialized upon program startup, the first item of this list, ``path[0]``
, |
607 is the directory containing the script that was used to invoke the Python | 607 is the directory containing the script that was used to invoke the Python |
608 interpreter. If the script directory is not available (e.g. if the interpre
ter | 608 interpreter. If the script directory is not available (e.g. if the interpre
ter |
609 is invoked interactively or if the script is read from standard input), | 609 is invoked interactively or if the script is read from standard input), |
610 ``path[0]`` is the empty string, which directs Python to search modules in th
e | 610 ``path[0]`` is the empty string, which directs Python to search modules in th
e |
611 current directory first. Notice that the script directory is inserted *befor
e* | 611 current directory first. Notice that the script directory is inserted *befor
e* |
612 the entries inserted as a result of :envvar:`PYTHONPATH`. | 612 the entries inserted as a result of :envvar:`PYTHONPATH`. |
613 | 613 |
614 A program is free to modify this list for its own purposes. | 614 A program is free to modify this list for its own purposes. |
(...skipping 361 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
976 The version number used to form registry keys on Windows platforms. This is | 976 The version number used to form registry keys on Windows platforms. This is |
977 stored as string resource 1000 in the Python DLL. The value is normally the | 977 stored as string resource 1000 in the Python DLL. The value is normally the |
978 first three characters of :const:`version`. It is provided in the :mod:`sys` | 978 first three characters of :const:`version`. It is provided in the :mod:`sys` |
979 module for informational purposes; modifying this value has no effect on the | 979 module for informational purposes; modifying this value has no effect on the |
980 registry keys used by Python. Availability: Windows. | 980 registry keys used by Python. Availability: Windows. |
981 | 981 |
982 .. rubric:: Citations | 982 .. rubric:: Citations |
983 | 983 |
984 .. [C99] ISO/IEC 9899:1999. "Programming languages -- C." A public draft of th
is standard is available at http://www.open-std.org/jtc1/sc22/wg14/www/docs/n125
6.pdf . | 984 .. [C99] ISO/IEC 9899:1999. "Programming languages -- C." A public draft of th
is standard is available at http://www.open-std.org/jtc1/sc22/wg14/www/docs/n125
6.pdf . |
985 | 985 |
OLD | NEW |