There are a set of modules that provide interfaces to various MacOS toolboxes. If applicable the module will define a number of Python objects for the various structures declared by the toolbox, and operations will be implemented as methods of the object. Other operations will be implemented as functions in the module. Not all operations possible in C will also be possible in Python (callbacks are often a problem), and parameters will occasionally be different in Python (input and output buffers, especially). All methods and functions have a __doc__ string describing their arguments and return values, and for additional description you are referred to Inside Macintosh or similar works.
These modules all live in a package called Carbon. Despite that name they are not all part of the Carbon framework: CF is really in the CoreFoundation framework and Qt is in the QuickTime framework. The normal use pattern is :
from Carbon import AE
Warning! These modules are not yet documented. If you wish to contribute documentation of any of these modules, please get in touch with docs@python.org.
Platforms: Mac
Platforms: Mac
Platforms: Mac
Platforms: Mac
The CFBase, CFArray, CFData, CFDictionary, CFString and CFURL objects are supported, some only partially.
Platforms: Mac
Platforms: Mac
Platforms: Mac
Platforms: Mac
Platforms: Mac
Platforms: Mac
Platforms: Mac
Platforms: Mac
Platforms: Mac
Platforms: Mac
Platforms: Mac
Platforms: Mac
Platforms: Mac
Platforms: Mac
Platforms: Mac
Platforms: Mac
Platforms: Mac
This module is only fully available on MacOS9 and earlier under classic PPC MacPython. Very limited functionality is available under Carbon MacPython.
The Scrap Manager supports the simplest form of cut & paste operations on the Macintosh. It can be use for both inter- and intra-application clipboard operations.
The Scrap module provides low-level access to the functions of the Scrap Manager. It contains the following functions:
Return current information about the scrap. The information is encoded as a tuple containing the fields (size, handle, count, state, path).
| Field | Meaning |
|---|---|
| size | Size of the scrap in bytes. |
| handle | Resource object representing the scrap. |
| count | Serial number of the scrap contents. |
| state | Integer; positive if in memory, 0 if on disk, negative if uninitialized. |
| path | Filename of the scrap when stored on disk. |
See also
Platforms: Mac
Platforms: Mac
Platforms: Mac
关于本评注系统
本站使用上下文关联的评注系统来收集反馈信息。不同于一般对整章做评注的做法, 我们允许你对每一个独立的“文本块”做评注。一个“文本块”看起来是这样的:
一个“文本块”是一个段落,一个列表项,一段代码,或者其他一小段内容。 你选中它会高亮度显示:
要对文本块做评注,你只需要点击它旁边的标识块:
我们会仔细阅读每个评论,如果可能的话我们也会把评注考虑到未来的版本中去:
如果你愿意你的评注被采用,请确保留下你的全名 (注意不是昵称或简称)
Many, many thanks to Jack Slocum; the inspiration and much of the code for the comment system comes from Jack's blog, and this site couldn't have been built without his wonderful
YAHOO.extlibrary. Thanks also to Yahoo for YUI itself.