This module provides access to MacOS specific functionality in the Pythoninterpreter, such as how the interpreter eventloop functions and the like. Usewith care.
Always 'macho', from Python 2.4 on. In earlier versions of Python the value could also be 'ppc' for the classic Mac OS 8 runtime model or 'carbon' for the Mac OS 9 runtime model. MacOS.linkmodel¶ The way the interpreter has been linked.
Note the capitalization of the module name; this is a historical artifact.
The official home of the Python Programming Language. Version Operating System Description MD5 Sum File Size GPG; Gzipped source tarball. First, download the latest version of Python 2.7 from the official website. If you want to be sure you are installing a fully up-to-date version, click the Downloads Windows link from the home page of the Python.org web site. The Windows version is provided as an MSI package.
- The same source code archive can also be used to build the Windows and Mac versions, and is the starting point for ports to all other platforms. Download the latest Python 3 and Python 2 source. Alternative Implementations. Gpg -verify Python-3.6.2.tgz.asc.
- The official home of the Python Programming Language. While Javascript is not essential for this website, your interaction with the content will be limited.
MacOS.
runtimemodel
¶Always 'macho'
, from Python 2.4 on. In earlier versions of Python the valuecould also be 'ppc'
for the classic Mac OS 8 runtime model or 'carbon'
for the Mac OS 9 runtime model.
MacOS.
linkmodel
¶The way the interpreter has been linked. As extension modules may beincompatible between linking models, packages could use this information to givemore decent error messages. The value is one of 'static'
for a staticallylinked Python, 'framework'
for Python in a Mac OS X framework, 'shared'
for Python in a standard Unix shared library. Older Pythons could also have thevalue 'cfm'
for Mac OS 9-compatible Python.
MacOS.
Error
¶This exception is raised on MacOS generated errors, either from functions inthis module or from other mac-specific modules like the toolbox interfaces. Thearguments are the integer error code (the OSErr
value) and a textualdescription of the error code. Symbolic names for all known error codes aredefined in the standard module macerrors
.
MacOS.
GetErrorString
(errno)¶Return the textual description of MacOS error code errno.
MacOS.
DebugStr
(message[, object])¶On Mac OS X the string is simply printed to stderr (on older Mac OS systems moreelaborate functionality was available), but it provides a convenient location toattach a breakpoint in a low-level debugger like gdb.
Note
Not available in 64-bit mode.
MacOS.
SysBeep
()¶Ring the bell.
MacOS.
GetTicks
()¶Get the number of clock ticks (1/60th of a second) since system boot.
MacOS.
GetCreatorAndType
(file)¶Python 2 Virtualenv Mac
Return the file creator and file type as two four-character strings. The fileparameter can be a pathname or an FSSpec
or FSRef
object.
Note
It is not possible to use an FSSpec
in 64-bit mode.
MacOS.
SetCreatorAndType
(file, creator, type)¶Set the file creator and file type. The file parameter can be a pathname or anFSSpec
or FSRef
object. creator and type must be four characterstrings.
Note
It is not possible to use an FSSpec
in 64-bit mode.
MacOS.
openrf
(name[, mode])¶Open the resource fork of a file. Arguments are the same as for the built-infunction open()
. The object returned has file-like semantics, but it isnot a Python file object, so there may be subtle differences.
MacOS.
WMAvailable
()¶Checks whether the current process has access to the window manager. The methodwill return False
if the window manager is not available, for instance whenrunning on Mac OS X Server or when logged in via ssh, or when the currentinterpreter is not running from a fullblown application bundle. A script runsfrom an application bundle either when it has been started withpythonw instead of python or when running as an applet.
Uninstall Python 3 On Mac
MacOS.
splash
([resourceid])¶Python 2 Uninstall Mac
Opens a splash screen by resource id. Use resourceid 0
to closethe splash screen.