Mercurial > cpython-lru_cache-weakref
annotate Doc/lib/libplatform.tex @ 39042:c02fa187e0f4 legacy-trunk
Part of SF patch #1484695. This removes dead code. The chksum was
already verified in .frombuf() on the lines above. If there was
a problem an exception is raised, so there was no way this condition
could have been true.
| author | Neal Norwitz <nnorwitz@gmail.com> |
|---|---|
| date | Mon, 10 Jul 2006 00:23:17 +0000 |
| parents | 67f2190e1f6d |
| children | 8d2978142593 |
| rev | line source |
|---|---|
|
30693
4388bbad0bc3
Initial checkin of docs for Lib/platform.py .
Brett Cannon <bcannon@gmail.com>
parents:
diff
changeset
|
1 \section{\module{platform} --- |
|
4388bbad0bc3
Initial checkin of docs for Lib/platform.py .
Brett Cannon <bcannon@gmail.com>
parents:
diff
changeset
|
2 Access to underlying platform's identifying data.} |
|
4388bbad0bc3
Initial checkin of docs for Lib/platform.py .
Brett Cannon <bcannon@gmail.com>
parents:
diff
changeset
|
3 |
|
4388bbad0bc3
Initial checkin of docs for Lib/platform.py .
Brett Cannon <bcannon@gmail.com>
parents:
diff
changeset
|
4 \declaremodule{standard}{platform} |
|
4388bbad0bc3
Initial checkin of docs for Lib/platform.py .
Brett Cannon <bcannon@gmail.com>
parents:
diff
changeset
|
5 \modulesynopsis{Retrieves as much platform identifying data as possible.} |
|
4388bbad0bc3
Initial checkin of docs for Lib/platform.py .
Brett Cannon <bcannon@gmail.com>
parents:
diff
changeset
|
6 \moduleauthor{Marc-Andre Lemburg}{mal@egenix.com} |
|
4388bbad0bc3
Initial checkin of docs for Lib/platform.py .
Brett Cannon <bcannon@gmail.com>
parents:
diff
changeset
|
7 \sectionauthor{Bjorn Pettersen}{bpettersen@corp.fairisaac.com} |
|
4388bbad0bc3
Initial checkin of docs for Lib/platform.py .
Brett Cannon <bcannon@gmail.com>
parents:
diff
changeset
|
8 |
|
4388bbad0bc3
Initial checkin of docs for Lib/platform.py .
Brett Cannon <bcannon@gmail.com>
parents:
diff
changeset
|
9 \versionadded{2.3} |
|
4388bbad0bc3
Initial checkin of docs for Lib/platform.py .
Brett Cannon <bcannon@gmail.com>
parents:
diff
changeset
|
10 |
| 30739 | 11 \begin{notice} |
| 12 Specific platforms listed alphabetically, with Linux included in the | |
| 13 \UNIX{} section. | |
|
30693
4388bbad0bc3
Initial checkin of docs for Lib/platform.py .
Brett Cannon <bcannon@gmail.com>
parents:
diff
changeset
|
14 \end{notice} |
|
4388bbad0bc3
Initial checkin of docs for Lib/platform.py .
Brett Cannon <bcannon@gmail.com>
parents:
diff
changeset
|
15 |
|
4388bbad0bc3
Initial checkin of docs for Lib/platform.py .
Brett Cannon <bcannon@gmail.com>
parents:
diff
changeset
|
16 \subsection{Cross Platform} |
|
4388bbad0bc3
Initial checkin of docs for Lib/platform.py .
Brett Cannon <bcannon@gmail.com>
parents:
diff
changeset
|
17 |
|
4388bbad0bc3
Initial checkin of docs for Lib/platform.py .
Brett Cannon <bcannon@gmail.com>
parents:
diff
changeset
|
18 \begin{funcdesc}{architecture}{executable=sys.executable, bits='', linkage=''} |
|
4388bbad0bc3
Initial checkin of docs for Lib/platform.py .
Brett Cannon <bcannon@gmail.com>
parents:
diff
changeset
|
19 Queries the given executable (defaults to the Python interpreter |
|
34296
67f2190e1f6d
SF Patch #1093896: miscellaneous doc typos
Raymond Hettinger <python@rcn.com>
parents:
30739
diff
changeset
|
20 binary) for various architecture information. |
|
30693
4388bbad0bc3
Initial checkin of docs for Lib/platform.py .
Brett Cannon <bcannon@gmail.com>
parents:
diff
changeset
|
21 |
|
4388bbad0bc3
Initial checkin of docs for Lib/platform.py .
Brett Cannon <bcannon@gmail.com>
parents:
diff
changeset
|
22 Returns a tuple \code{(bits, linkage)} which contain information about |
|
4388bbad0bc3
Initial checkin of docs for Lib/platform.py .
Brett Cannon <bcannon@gmail.com>
parents:
diff
changeset
|
23 the bit architecture and the linkage format used for the |
|
4388bbad0bc3
Initial checkin of docs for Lib/platform.py .
Brett Cannon <bcannon@gmail.com>
parents:
diff
changeset
|
24 executable. Both values are returned as strings. |
|
4388bbad0bc3
Initial checkin of docs for Lib/platform.py .
Brett Cannon <bcannon@gmail.com>
parents:
diff
changeset
|
25 |
|
4388bbad0bc3
Initial checkin of docs for Lib/platform.py .
Brett Cannon <bcannon@gmail.com>
parents:
diff
changeset
|
26 Values that cannot be determined are returned as given by the |
|
4388bbad0bc3
Initial checkin of docs for Lib/platform.py .
Brett Cannon <bcannon@gmail.com>
parents:
diff
changeset
|
27 parameter presets. If bits is given as \code{''}, the |
|
4388bbad0bc3
Initial checkin of docs for Lib/platform.py .
Brett Cannon <bcannon@gmail.com>
parents:
diff
changeset
|
28 \cfunction{sizeof(pointer)} |
|
4388bbad0bc3
Initial checkin of docs for Lib/platform.py .
Brett Cannon <bcannon@gmail.com>
parents:
diff
changeset
|
29 (or \cfunction{sizeof(long)} on Python version < 1.5.2) is used as |
|
4388bbad0bc3
Initial checkin of docs for Lib/platform.py .
Brett Cannon <bcannon@gmail.com>
parents:
diff
changeset
|
30 indicator for the supported pointer size. |
|
4388bbad0bc3
Initial checkin of docs for Lib/platform.py .
Brett Cannon <bcannon@gmail.com>
parents:
diff
changeset
|
31 |
|
4388bbad0bc3
Initial checkin of docs for Lib/platform.py .
Brett Cannon <bcannon@gmail.com>
parents:
diff
changeset
|
32 The function relies on the system's \file{file} command to do the |
|
4388bbad0bc3
Initial checkin of docs for Lib/platform.py .
Brett Cannon <bcannon@gmail.com>
parents:
diff
changeset
|
33 actual work. This is available on most if not all \UNIX{} |
|
4388bbad0bc3
Initial checkin of docs for Lib/platform.py .
Brett Cannon <bcannon@gmail.com>
parents:
diff
changeset
|
34 platforms and some non-\UNIX{} platforms and then only if the |
|
4388bbad0bc3
Initial checkin of docs for Lib/platform.py .
Brett Cannon <bcannon@gmail.com>
parents:
diff
changeset
|
35 executable points to the Python interpreter. Reasonable defaults |
|
4388bbad0bc3
Initial checkin of docs for Lib/platform.py .
Brett Cannon <bcannon@gmail.com>
parents:
diff
changeset
|
36 are used when the above needs are not met. |
|
4388bbad0bc3
Initial checkin of docs for Lib/platform.py .
Brett Cannon <bcannon@gmail.com>
parents:
diff
changeset
|
37 \end{funcdesc} |
|
4388bbad0bc3
Initial checkin of docs for Lib/platform.py .
Brett Cannon <bcannon@gmail.com>
parents:
diff
changeset
|
38 |
|
4388bbad0bc3
Initial checkin of docs for Lib/platform.py .
Brett Cannon <bcannon@gmail.com>
parents:
diff
changeset
|
39 \begin{funcdesc}{machine}{} |
|
4388bbad0bc3
Initial checkin of docs for Lib/platform.py .
Brett Cannon <bcannon@gmail.com>
parents:
diff
changeset
|
40 Returns the machine type, e.g. \code{'i386'}. |
|
4388bbad0bc3
Initial checkin of docs for Lib/platform.py .
Brett Cannon <bcannon@gmail.com>
parents:
diff
changeset
|
41 An empty string is returned if the value cannot be determined. |
|
4388bbad0bc3
Initial checkin of docs for Lib/platform.py .
Brett Cannon <bcannon@gmail.com>
parents:
diff
changeset
|
42 \end{funcdesc} |
|
4388bbad0bc3
Initial checkin of docs for Lib/platform.py .
Brett Cannon <bcannon@gmail.com>
parents:
diff
changeset
|
43 |
|
4388bbad0bc3
Initial checkin of docs for Lib/platform.py .
Brett Cannon <bcannon@gmail.com>
parents:
diff
changeset
|
44 \begin{funcdesc}{node}{} |
| 30739 | 45 Returns the computer's network name (may not be fully qualified!). |
|
30693
4388bbad0bc3
Initial checkin of docs for Lib/platform.py .
Brett Cannon <bcannon@gmail.com>
parents:
diff
changeset
|
46 An empty string is returned if the value cannot be determined. |
|
4388bbad0bc3
Initial checkin of docs for Lib/platform.py .
Brett Cannon <bcannon@gmail.com>
parents:
diff
changeset
|
47 \end{funcdesc} |
|
4388bbad0bc3
Initial checkin of docs for Lib/platform.py .
Brett Cannon <bcannon@gmail.com>
parents:
diff
changeset
|
48 |
|
4388bbad0bc3
Initial checkin of docs for Lib/platform.py .
Brett Cannon <bcannon@gmail.com>
parents:
diff
changeset
|
49 \begin{funcdesc}{platform}{aliased=0, terse=0} |
| 30739 | 50 Returns a single string identifying the underlying platform |
| 51 with as much useful information as possible. | |
| 52 | |
| 53 The output is intended to be \emph{human readable} rather than | |
| 54 machine parseable. It may look different on different platforms and | |
| 55 this is intended. | |
| 56 | |
| 57 If \var{aliased} is true, the function will use aliases for various | |
| 58 platforms that report system names which differ from their common | |
| 59 names, for example SunOS will be reported as Solaris. The | |
| 60 \function{system_alias()} function is used to implement this. | |
| 61 | |
| 62 Setting \var{terse} to true causes the function to return only the | |
| 63 absolute minimum information needed to identify the platform. | |
|
30693
4388bbad0bc3
Initial checkin of docs for Lib/platform.py .
Brett Cannon <bcannon@gmail.com>
parents:
diff
changeset
|
64 \end{funcdesc} |
|
4388bbad0bc3
Initial checkin of docs for Lib/platform.py .
Brett Cannon <bcannon@gmail.com>
parents:
diff
changeset
|
65 |
|
4388bbad0bc3
Initial checkin of docs for Lib/platform.py .
Brett Cannon <bcannon@gmail.com>
parents:
diff
changeset
|
66 \begin{funcdesc}{processor}{} |
| 30739 | 67 Returns the (real) processor name, e.g. \code{'amdk6'}. |
|
30693
4388bbad0bc3
Initial checkin of docs for Lib/platform.py .
Brett Cannon <bcannon@gmail.com>
parents:
diff
changeset
|
68 |
| 30739 | 69 An empty string is returned if the value cannot be determined. Note |
| 70 that many platforms do not provide this information or simply return | |
| 71 the same value as for \function{machine()}. NetBSD does this. | |
|
30693
4388bbad0bc3
Initial checkin of docs for Lib/platform.py .
Brett Cannon <bcannon@gmail.com>
parents:
diff
changeset
|
72 \end{funcdesc} |
|
4388bbad0bc3
Initial checkin of docs for Lib/platform.py .
Brett Cannon <bcannon@gmail.com>
parents:
diff
changeset
|
73 |
|
4388bbad0bc3
Initial checkin of docs for Lib/platform.py .
Brett Cannon <bcannon@gmail.com>
parents:
diff
changeset
|
74 \begin{funcdesc}{python_build}{} |
| 30739 | 75 Returns a tuple \code{(\var{buildno}, \var{builddate})} stating the |
| 76 Python build number and date as strings. | |
|
30693
4388bbad0bc3
Initial checkin of docs for Lib/platform.py .
Brett Cannon <bcannon@gmail.com>
parents:
diff
changeset
|
77 \end{funcdesc} |
|
4388bbad0bc3
Initial checkin of docs for Lib/platform.py .
Brett Cannon <bcannon@gmail.com>
parents:
diff
changeset
|
78 |
|
4388bbad0bc3
Initial checkin of docs for Lib/platform.py .
Brett Cannon <bcannon@gmail.com>
parents:
diff
changeset
|
79 \begin{funcdesc}{python_compiler}{} |
| 30739 | 80 Returns a string identifying the compiler used for compiling Python. |
|
30693
4388bbad0bc3
Initial checkin of docs for Lib/platform.py .
Brett Cannon <bcannon@gmail.com>
parents:
diff
changeset
|
81 \end{funcdesc} |
|
4388bbad0bc3
Initial checkin of docs for Lib/platform.py .
Brett Cannon <bcannon@gmail.com>
parents:
diff
changeset
|
82 |
|
4388bbad0bc3
Initial checkin of docs for Lib/platform.py .
Brett Cannon <bcannon@gmail.com>
parents:
diff
changeset
|
83 \begin{funcdesc}{python_version}{} |
|
4388bbad0bc3
Initial checkin of docs for Lib/platform.py .
Brett Cannon <bcannon@gmail.com>
parents:
diff
changeset
|
84 Returns the Python version as string \code{'major.minor.patchlevel'} |
|
4388bbad0bc3
Initial checkin of docs for Lib/platform.py .
Brett Cannon <bcannon@gmail.com>
parents:
diff
changeset
|
85 |
|
4388bbad0bc3
Initial checkin of docs for Lib/platform.py .
Brett Cannon <bcannon@gmail.com>
parents:
diff
changeset
|
86 Note that unlike the Python \code{sys.version}, the returned value |
|
4388bbad0bc3
Initial checkin of docs for Lib/platform.py .
Brett Cannon <bcannon@gmail.com>
parents:
diff
changeset
|
87 will always include the patchlevel (it defaults to 0). |
|
4388bbad0bc3
Initial checkin of docs for Lib/platform.py .
Brett Cannon <bcannon@gmail.com>
parents:
diff
changeset
|
88 \end{funcdesc} |
|
4388bbad0bc3
Initial checkin of docs for Lib/platform.py .
Brett Cannon <bcannon@gmail.com>
parents:
diff
changeset
|
89 |
|
4388bbad0bc3
Initial checkin of docs for Lib/platform.py .
Brett Cannon <bcannon@gmail.com>
parents:
diff
changeset
|
90 \begin{funcdesc}{python_version_tuple}{} |
| 30739 | 91 Returns the Python version as tuple \code{(\var{major}, \var{minor}, |
| 92 \var{patchlevel})} of strings. | |
|
30693
4388bbad0bc3
Initial checkin of docs for Lib/platform.py .
Brett Cannon <bcannon@gmail.com>
parents:
diff
changeset
|
93 |
|
4388bbad0bc3
Initial checkin of docs for Lib/platform.py .
Brett Cannon <bcannon@gmail.com>
parents:
diff
changeset
|
94 Note that unlike the Python \code{sys.version}, the returned value |
| 30739 | 95 will always include the patchlevel (it defaults to \code{'0'}). |
|
30693
4388bbad0bc3
Initial checkin of docs for Lib/platform.py .
Brett Cannon <bcannon@gmail.com>
parents:
diff
changeset
|
96 \end{funcdesc} |
|
4388bbad0bc3
Initial checkin of docs for Lib/platform.py .
Brett Cannon <bcannon@gmail.com>
parents:
diff
changeset
|
97 |
|
4388bbad0bc3
Initial checkin of docs for Lib/platform.py .
Brett Cannon <bcannon@gmail.com>
parents:
diff
changeset
|
98 \begin{funcdesc}{release}{} |
|
4388bbad0bc3
Initial checkin of docs for Lib/platform.py .
Brett Cannon <bcannon@gmail.com>
parents:
diff
changeset
|
99 Returns the system's release, e.g. \code{'2.2.0'} or \code{'NT'} |
|
4388bbad0bc3
Initial checkin of docs for Lib/platform.py .
Brett Cannon <bcannon@gmail.com>
parents:
diff
changeset
|
100 An empty string is returned if the value cannot be determined. |
|
4388bbad0bc3
Initial checkin of docs for Lib/platform.py .
Brett Cannon <bcannon@gmail.com>
parents:
diff
changeset
|
101 \end{funcdesc} |
|
4388bbad0bc3
Initial checkin of docs for Lib/platform.py .
Brett Cannon <bcannon@gmail.com>
parents:
diff
changeset
|
102 |
|
4388bbad0bc3
Initial checkin of docs for Lib/platform.py .
Brett Cannon <bcannon@gmail.com>
parents:
diff
changeset
|
103 \begin{funcdesc}{system}{} |
| 30739 | 104 Returns the system/OS name, e.g. \code{'Linux'}, \code{'Windows'}, |
| 105 or \code{'Java'}. | |
|
30693
4388bbad0bc3
Initial checkin of docs for Lib/platform.py .
Brett Cannon <bcannon@gmail.com>
parents:
diff
changeset
|
106 An empty string is returned if the value cannot be determined. |
|
4388bbad0bc3
Initial checkin of docs for Lib/platform.py .
Brett Cannon <bcannon@gmail.com>
parents:
diff
changeset
|
107 \end{funcdesc} |
|
4388bbad0bc3
Initial checkin of docs for Lib/platform.py .
Brett Cannon <bcannon@gmail.com>
parents:
diff
changeset
|
108 |
|
4388bbad0bc3
Initial checkin of docs for Lib/platform.py .
Brett Cannon <bcannon@gmail.com>
parents:
diff
changeset
|
109 \begin{funcdesc}{system_alias}{system, release, version} |
| 30739 | 110 Returns \code{(\var{system}, \var{release}, \var{version})} aliased |
| 111 to common marketing names used for some systems. It also does some | |
| 112 reordering of the information in some cases where it would otherwise | |
| 113 cause confusion. | |
|
30693
4388bbad0bc3
Initial checkin of docs for Lib/platform.py .
Brett Cannon <bcannon@gmail.com>
parents:
diff
changeset
|
114 \end{funcdesc} |
|
4388bbad0bc3
Initial checkin of docs for Lib/platform.py .
Brett Cannon <bcannon@gmail.com>
parents:
diff
changeset
|
115 |
|
4388bbad0bc3
Initial checkin of docs for Lib/platform.py .
Brett Cannon <bcannon@gmail.com>
parents:
diff
changeset
|
116 \begin{funcdesc}{version}{} |
| 30739 | 117 Returns the system's release version, e.g. \code{'\#3 on degas'}. |
|
30693
4388bbad0bc3
Initial checkin of docs for Lib/platform.py .
Brett Cannon <bcannon@gmail.com>
parents:
diff
changeset
|
118 An empty string is returned if the value cannot be determined. |
|
4388bbad0bc3
Initial checkin of docs for Lib/platform.py .
Brett Cannon <bcannon@gmail.com>
parents:
diff
changeset
|
119 \end{funcdesc} |
|
4388bbad0bc3
Initial checkin of docs for Lib/platform.py .
Brett Cannon <bcannon@gmail.com>
parents:
diff
changeset
|
120 |
|
4388bbad0bc3
Initial checkin of docs for Lib/platform.py .
Brett Cannon <bcannon@gmail.com>
parents:
diff
changeset
|
121 \begin{funcdesc}{uname}{} |
| 30739 | 122 Fairly portable uname interface. Returns a tuple of strings |
| 123 \code{(\var{system}, \var{node}, \var{release}, \var{version}, | |
| 124 \var{machine}, \var{processor})} identifying the underlying | |
| 125 platform. | |
|
30693
4388bbad0bc3
Initial checkin of docs for Lib/platform.py .
Brett Cannon <bcannon@gmail.com>
parents:
diff
changeset
|
126 |
|
4388bbad0bc3
Initial checkin of docs for Lib/platform.py .
Brett Cannon <bcannon@gmail.com>
parents:
diff
changeset
|
127 Note that unlike the \function{os.uname()} function this also returns |
|
4388bbad0bc3
Initial checkin of docs for Lib/platform.py .
Brett Cannon <bcannon@gmail.com>
parents:
diff
changeset
|
128 possible processor information as additional tuple entry. |
|
4388bbad0bc3
Initial checkin of docs for Lib/platform.py .
Brett Cannon <bcannon@gmail.com>
parents:
diff
changeset
|
129 |
|
4388bbad0bc3
Initial checkin of docs for Lib/platform.py .
Brett Cannon <bcannon@gmail.com>
parents:
diff
changeset
|
130 Entries which cannot be determined are set to \code{''}. |
|
4388bbad0bc3
Initial checkin of docs for Lib/platform.py .
Brett Cannon <bcannon@gmail.com>
parents:
diff
changeset
|
131 \end{funcdesc} |
|
4388bbad0bc3
Initial checkin of docs for Lib/platform.py .
Brett Cannon <bcannon@gmail.com>
parents:
diff
changeset
|
132 |
| 30739 | 133 |
|
30693
4388bbad0bc3
Initial checkin of docs for Lib/platform.py .
Brett Cannon <bcannon@gmail.com>
parents:
diff
changeset
|
134 \subsection{Java Platform} |
|
4388bbad0bc3
Initial checkin of docs for Lib/platform.py .
Brett Cannon <bcannon@gmail.com>
parents:
diff
changeset
|
135 |
| 30739 | 136 \begin{funcdesc}{java_ver}{release='', vendor='', vminfo=('','',''), |
| 137 osinfo=('','','')} | |
| 138 Version interface for JPython. | |
| 139 | |
| 140 Returns a tuple \code{(\var{release}, \var{vendor}, \var{vminfo}, | |
| 141 \var{osinfo})} with \var{vminfo} being a tuple \code{(\var{vm_name}, | |
| 142 \var{vm_release}, \var{vm_vendor})} and \var{osinfo} being a tuple | |
| 143 \code{(\var{os_name}, \var{os_version}, \var{os_arch})}. | |
| 144 Values which cannot be determined are set to the defaults | |
| 145 given as parameters (which all default to \code{''}). | |
|
30693
4388bbad0bc3
Initial checkin of docs for Lib/platform.py .
Brett Cannon <bcannon@gmail.com>
parents:
diff
changeset
|
146 \end{funcdesc} |
|
4388bbad0bc3
Initial checkin of docs for Lib/platform.py .
Brett Cannon <bcannon@gmail.com>
parents:
diff
changeset
|
147 |
| 30739 | 148 |
|
30693
4388bbad0bc3
Initial checkin of docs for Lib/platform.py .
Brett Cannon <bcannon@gmail.com>
parents:
diff
changeset
|
149 \subsection{Windows Platform} |
|
4388bbad0bc3
Initial checkin of docs for Lib/platform.py .
Brett Cannon <bcannon@gmail.com>
parents:
diff
changeset
|
150 |
|
4388bbad0bc3
Initial checkin of docs for Lib/platform.py .
Brett Cannon <bcannon@gmail.com>
parents:
diff
changeset
|
151 \begin{funcdesc}{win32_ver}{release='', version='', csd='', ptype=''} |
| 30739 | 152 Get additional version information from the Windows Registry |
| 153 and return a tuple \code{(\var{version}, \var{csd}, \var{ptype})} | |
| 154 referring to version number, CSD level and OS type (multi/single | |
| 155 processor). | |
|
30693
4388bbad0bc3
Initial checkin of docs for Lib/platform.py .
Brett Cannon <bcannon@gmail.com>
parents:
diff
changeset
|
156 |
| 30739 | 157 As a hint: \var{ptype} is \code{'Uniprocessor Free'} on single |
| 158 processor NT machines and \code{'Multiprocessor Free'} on multi | |
| 159 processor machines. The \emph{'Free'} refers to the OS version being | |
| 160 free of debugging code. It could also state \emph{'Checked'} which | |
| 161 means the OS version uses debugging code, i.e. code that | |
| 162 checks arguments, ranges, etc. | |
|
30693
4388bbad0bc3
Initial checkin of docs for Lib/platform.py .
Brett Cannon <bcannon@gmail.com>
parents:
diff
changeset
|
163 |
| 30739 | 164 \begin{notice}[note] |
| 165 This function only works if Mark Hammond's \module{win32all} | |
| 166 package is installed and (obviously) only runs on Win32 | |
| 167 compatible platforms. | |
| 168 \end{notice} | |
|
30693
4388bbad0bc3
Initial checkin of docs for Lib/platform.py .
Brett Cannon <bcannon@gmail.com>
parents:
diff
changeset
|
169 \end{funcdesc} |
|
4388bbad0bc3
Initial checkin of docs for Lib/platform.py .
Brett Cannon <bcannon@gmail.com>
parents:
diff
changeset
|
170 |
|
4388bbad0bc3
Initial checkin of docs for Lib/platform.py .
Brett Cannon <bcannon@gmail.com>
parents:
diff
changeset
|
171 \subsubsection{Win95/98 specific} |
|
4388bbad0bc3
Initial checkin of docs for Lib/platform.py .
Brett Cannon <bcannon@gmail.com>
parents:
diff
changeset
|
172 |
|
4388bbad0bc3
Initial checkin of docs for Lib/platform.py .
Brett Cannon <bcannon@gmail.com>
parents:
diff
changeset
|
173 \begin{funcdesc}{popen}{cmd, mode='r', bufsize=None} |
| 30739 | 174 Portable \function{popen()} interface. Find a working popen |
| 175 implementation preferring \function{win32pipe.popen()}. On Windows | |
| 176 NT, \function{win32pipe.popen()} should work; on Windows 9x it hangs | |
| 177 due to bugs in the MS C library. | |
| 178 % This KnowledgeBase article appears to be missing... | |
| 179 %See also \ulink{MS KnowledgeBase article Q150956}{}. | |
|
30693
4388bbad0bc3
Initial checkin of docs for Lib/platform.py .
Brett Cannon <bcannon@gmail.com>
parents:
diff
changeset
|
180 \end{funcdesc} |
|
4388bbad0bc3
Initial checkin of docs for Lib/platform.py .
Brett Cannon <bcannon@gmail.com>
parents:
diff
changeset
|
181 |
|
4388bbad0bc3
Initial checkin of docs for Lib/platform.py .
Brett Cannon <bcannon@gmail.com>
parents:
diff
changeset
|
182 |
| 30739 | 183 \subsection{Mac OS Platform} |
|
30693
4388bbad0bc3
Initial checkin of docs for Lib/platform.py .
Brett Cannon <bcannon@gmail.com>
parents:
diff
changeset
|
184 |
|
4388bbad0bc3
Initial checkin of docs for Lib/platform.py .
Brett Cannon <bcannon@gmail.com>
parents:
diff
changeset
|
185 \begin{funcdesc}{mac_ver}{release='', versioninfo=('','',''), machine=''} |
| 30739 | 186 Get Mac OS version information and return it as tuple |
| 187 \code{(\var{release}, \var{versioninfo}, \var{machine})} with | |
| 188 \var{versioninfo} being a tuple \code{(\var{version}, | |
| 189 \var{dev_stage}, \var{non_release_version})}. | |
|
30693
4388bbad0bc3
Initial checkin of docs for Lib/platform.py .
Brett Cannon <bcannon@gmail.com>
parents:
diff
changeset
|
190 |
| 30739 | 191 Entries which cannot be determined are set to \code{''}. All tuple |
| 192 entries are strings. | |
| 193 | |
| 194 Documentation for the underlying \cfunction{gestalt()} API is | |
| 195 available online at \url{http://www.rgaros.nl/gestalt/}. | |
|
30693
4388bbad0bc3
Initial checkin of docs for Lib/platform.py .
Brett Cannon <bcannon@gmail.com>
parents:
diff
changeset
|
196 \end{funcdesc} |
|
4388bbad0bc3
Initial checkin of docs for Lib/platform.py .
Brett Cannon <bcannon@gmail.com>
parents:
diff
changeset
|
197 |
| 30739 | 198 |
|
30693
4388bbad0bc3
Initial checkin of docs for Lib/platform.py .
Brett Cannon <bcannon@gmail.com>
parents:
diff
changeset
|
199 \subsection{\UNIX{} Platforms} |
|
4388bbad0bc3
Initial checkin of docs for Lib/platform.py .
Brett Cannon <bcannon@gmail.com>
parents:
diff
changeset
|
200 |
| 30739 | 201 \begin{funcdesc}{dist}{distname='', version='', id='', |
| 202 supported_dists=('SuSE','debian','redhat','mandrake')} | |
| 203 Tries to determine the name of the OS distribution name | |
| 204 Returns a tuple \code{(\var{distname}, \var{version}, \var{id})} | |
| 205 which defaults to the args given as parameters. | |
|
30693
4388bbad0bc3
Initial checkin of docs for Lib/platform.py .
Brett Cannon <bcannon@gmail.com>
parents:
diff
changeset
|
206 \end{funcdesc} |
|
4388bbad0bc3
Initial checkin of docs for Lib/platform.py .
Brett Cannon <bcannon@gmail.com>
parents:
diff
changeset
|
207 |
|
4388bbad0bc3
Initial checkin of docs for Lib/platform.py .
Brett Cannon <bcannon@gmail.com>
parents:
diff
changeset
|
208 |
| 30739 | 209 \begin{funcdesc}{libc_ver}{executable=sys.executable, lib='', |
| 210 version='', chunksize=2048} | |
| 211 Tries to determine the libc version against which the file | |
| 212 executable (defaults to the Python interpreter) is linked. Returns | |
| 213 a tuple of strings \code{(\var{lib}, \var{version})} which default | |
| 214 to the given parameters in case the lookup fails. | |
|
30693
4388bbad0bc3
Initial checkin of docs for Lib/platform.py .
Brett Cannon <bcannon@gmail.com>
parents:
diff
changeset
|
215 |
| 30739 | 216 Note that this function has intimate knowledge of how different |
|
30693
4388bbad0bc3
Initial checkin of docs for Lib/platform.py .
Brett Cannon <bcannon@gmail.com>
parents:
diff
changeset
|
217 libc versions add symbols to the executable is probably only |
| 30739 | 218 useable for executables compiled using \program{gcc}. |
|
30693
4388bbad0bc3
Initial checkin of docs for Lib/platform.py .
Brett Cannon <bcannon@gmail.com>
parents:
diff
changeset
|
219 |
| 30739 | 220 The file is read and scanned in chunks of \var{chunksize} bytes. |
|
30693
4388bbad0bc3
Initial checkin of docs for Lib/platform.py .
Brett Cannon <bcannon@gmail.com>
parents:
diff
changeset
|
221 \end{funcdesc} |
