Merge the Mac library part into the Library part.

The "Using Python on the Mac" is now a HOWTO.
This commit is contained in:
Georg Brandl
2007-08-15 09:00:54 +00:00
parent 1716523338
commit 0503040766
54 changed files with 396 additions and 488 deletions

View File

@@ -8,7 +8,6 @@
tutorial/index.rst tutorial/index.rst
reference/index.rst reference/index.rst
library/index.rst library/index.rst
maclib/index.rst
extending/index.rst extending/index.rst
c-api/index.rst c-api/index.rst
distutils/index.rst distutils/index.rst

View File

@@ -14,6 +14,7 @@ Currently, the HOWTOs are:
:maxdepth: 1 :maxdepth: 1
advocacy.rst advocacy.rst
pythonmac.rst
curses.rst curses.rst
doanddont.rst doanddont.rst
functional.rst functional.rst

View File

@@ -1,11 +1,11 @@
.. _using: .. _using-on-mac:
*************************** ***************************
Using Python on a Macintosh Using Python on a Macintosh
*************************** ***************************
.. sectionauthor:: Bob Savage <bobsavage@mac.com> :Author: Bob Savage <bobsavage@mac.com>
Python on a Macintosh running Mac OS X is in principle very similar to Python on Python on a Macintosh running Mac OS X is in principle very similar to Python on

View File

@@ -26,12 +26,6 @@ framework and Qt is in the QuickTime framework. The normal use pattern is ::
documentation of any of these modules, please get in touch with docs@python.org. documentation of any of these modules, please get in touch with docs@python.org.
.. toctree::
colorpicker.rst
.. % \section{Argument Handling for Toolbox Modules}
:mod:`Carbon.AE` --- Apple Events :mod:`Carbon.AE` --- Apple Events
================================= =================================
@@ -220,7 +214,49 @@ The ``CFBase``, ``CFArray``, ``CFData``, ``CFDictionary``, ``CFString`` and
.. module:: Carbon.Scrap .. module:: Carbon.Scrap
:platform: Mac :platform: Mac
:synopsis: Interface to the Carbon Scrap Manager. :synopsis: The Scrap Manager provides basic services for implementing cut & paste and
clipboard operations.
This module is only fully available on MacOS9 and earlier under classic PPC
MacPython. Very limited functionality is available under Carbon MacPython.
.. index:: single: Scrap Manager
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 :mod:`Scrap` module provides low-level access to the functions of the Scrap
Manager. It contains the following functions:
.. function:: InfoScrap()
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. |
+----------+---------------------------------------------+
.. seealso::
`Scrap Manager <http://developer.apple.com/documentation/mac/MoreToolbox/MoreToolbox-109.html>`_
Apple's documentation for the Scrap Manager gives a lot of useful information
about using the Scrap Manager in applications.

View File

@@ -24,6 +24,7 @@ in this chapter is:
linecache.rst linecache.rst
shutil.rst shutil.rst
dircache.rst dircache.rst
macpath.rst
.. seealso:: .. seealso::

View File

@@ -1,10 +1,10 @@
:mod:`ic` --- Access to Internet Config :mod:`ic` --- Access to the Mac OS X Internet Config
======================================= ====================================================
.. module:: ic .. module:: ic
:platform: Mac :platform: Mac
:synopsis: Access to Internet Config. :synopsis: Access to the Mac OS X Internet Config.
This module provides access to various internet-related preferences set through This module provides access to various internet-related preferences set through
@@ -117,4 +117,3 @@ methods:
Given an existing *file*, specified either as a filename or as an :func:`FSSpec` Given an existing *file*, specified either as a filename or as an :func:`FSSpec`
result, set its creator and type correctly based on its extension. The finder result, set its creator and type correctly based on its extension. The finder
is told about the change, so the finder icon will be updated quickly. is told about the change, so the finder icon will be updated quickly.

View File

@@ -78,6 +78,8 @@ over 2500 additional components available from the `Python Package Index
misc.rst misc.rst
windows.rst windows.rst
unix.rst unix.rst
mac.rst
macosa.rst
sgi.rst sgi.rst
sun.rst sun.rst
undoc.rst undoc.rst

19
Doc-26/library/mac.rst Normal file
View File

@@ -0,0 +1,19 @@
*************************
MacOS X specific services
*************************
This chapter describes modules that are only available on the Mac OS X platform.
See also the chapters :ref:`mac-scripting` and :ref:`undoc-mac-modules`.
.. toctree::
ic.rst
macos.rst
macostools.rst
easydialogs.rst
framework.rst
autogil.rst
carbon.rst
colorpicker.rst

View File

@@ -1,5 +1,5 @@
.. _scripting: .. _mac-scripting:
********************* *********************
MacPython OSA Modules MacPython OSA Modules
@@ -78,14 +78,14 @@ according to a small number of rules:
Python also has support for creating scriptable applications in Python, but The Python also has support for creating scriptable applications in Python, but The
following modules are relevant to MacPython AppleScript support: following modules are relevant to MacPython AppleScript support:
.. toctree:: .. toctree::
gensuitemodule.rst gensuitemodule.rst
aetools.rst aetools.rst
aepack.rst aepack.rst
aetypes.rst aetypes.rst
miniae.rst miniaeframe.rst
In addition, support modules have been pre-generated for :mod:`Finder`, In addition, support modules have been pre-generated for :mod:`Finder`,
:mod:`Terminal`, :mod:`Explorer`, :mod:`Netscape`, :mod:`CodeWarrior`, :mod:`Terminal`, :mod:`Explorer`, :mod:`Netscape`, :mod:`CodeWarrior`,

View File

@@ -1,18 +1,14 @@
:mod:`macpath` --- MacOS path manipulation functions :mod:`macpath` --- MacOS 9 path manipulation functions
==================================================== ======================================================
.. module:: macpath .. module:: macpath
:synopsis: MacOS path manipulation functions. :synopsis: MacOS 9 path manipulation functions.
.. % Could be labeled \platform{Mac}, but the module should work anywhere and
.. % is distributed with the standard library.
This module is the Mac OS 9 (and earlier) implementation of the :mod:`os.path` This module is the Mac OS 9 (and earlier) implementation of the :mod:`os.path`
module. It can be used to manipulate old-style Macintosh pathnames on Mac OS X module. It can be used to manipulate old-style Macintosh pathnames on Mac OS X
(or any other platform). Refer to the Python Library Reference for documentation (or any other platform).
of :mod:`os.path`.
The following functions are available in this module: :func:`normcase`, The following functions are available in this module: :func:`normcase`,
:func:`normpath`, :func:`isabs`, :func:`join`, :func:`split`, :func:`isdir`, :func:`normpath`, :func:`isabs`, :func:`join`, :func:`split`, :func:`isdir`,

View File

@@ -14,15 +14,6 @@ Fredrik Lundh; the specific contents of this chapter have been substantially
revised. revised.
Frameworks
==========
Frameworks tend to be harder to document, but are well worth the effort spent.
None at this time.
Miscellaneous useful utilities Miscellaneous useful utilities
============================== ==============================
@@ -71,6 +62,128 @@ Multimedia
or demo. Requires the external program :program:`sox`. or demo. Requires the external program :program:`sox`.
.. _undoc-mac-modules:
Undocumented Mac OS modules
===========================
:mod:`applesingle` --- AppleSingle decoder
------------------------------------------
.. module:: applesingle
:platform: Mac
:synopsis: Rudimentary decoder for AppleSingle format files.
:mod:`buildtools` --- Helper module for BuildApplet and Friends
---------------------------------------------------------------
.. module:: buildtools
:platform: Mac
:synopsis: Helper module for BuildApplet, BuildApplication and macfreeze.
.. deprecated:: 2.4
:mod:`cfmfile` --- Code Fragment Resource module
------------------------------------------------
.. module:: cfmfile
:platform: Mac
:synopsis: Code Fragment Resource module.
:mod:`cfmfile` is a module that understands Code Fragments and the accompanying
"cfrg" resources. It can parse them and merge them, and is used by
BuildApplication to combine all plugin modules to a single executable.
.. deprecated:: 2.4
:mod:`icopen` --- Internet Config replacement for :meth:`open`
--------------------------------------------------------------
.. module:: icopen
:platform: Mac
:synopsis: Internet Config replacement for open().
Importing :mod:`icopen` will replace the builtin :meth:`open` with a version
that uses Internet Config to set file type and creator for new files.
:mod:`macerrors` --- Mac OS Errors
----------------------------------
.. module:: macerrors
:platform: Mac
:synopsis: Constant definitions for many Mac OS error codes.
:mod:`macerrors` contains constant definitions for many Mac OS error codes.
:mod:`macresource` --- Locate script resources
----------------------------------------------
.. module:: macresource
:platform: Mac
:synopsis: Locate script resources.
:mod:`macresource` helps scripts finding their resources, such as dialogs and
menus, without requiring special case code for when the script is run under
MacPython, as a MacPython applet or under OSX Python.
:mod:`Nav` --- NavServices calls
--------------------------------
.. module:: Nav
:platform: Mac
:synopsis: Interface to Navigation Services.
A low-level interface to Navigation Services.
:mod:`PixMapWrapper` --- Wrapper for PixMap objects
---------------------------------------------------
.. module:: PixMapWrapper
:platform: Mac
:synopsis: Wrapper for PixMap objects.
:mod:`PixMapWrapper` wraps a PixMap object with a Python object that allows
access to the fields by name. It also has methods to convert to and from
:mod:`PIL` images.
:mod:`videoreader` --- Read QuickTime movies
--------------------------------------------
.. module:: videoreader
:platform: Mac
:synopsis: Read QuickTime movies frame by frame for further processing.
:mod:`videoreader` reads and decodes QuickTime movies and passes a stream of
images to your program. It also provides some support for audio tracks.
:mod:`W` --- Widgets built on :mod:`FrameWork`
----------------------------------------------
.. module:: W
:platform: Mac
:synopsis: Widgets for the Mac, built on top of FrameWork.
The :mod:`W` widgets are used extensively in the :program:`IDE`.
.. _obsolete-modules: .. _obsolete-modules:
Obsolete Obsolete

View File

@@ -1,34 +0,0 @@
.. _maclib-index:
##############################
Macintosh Library Modules
##############################
:Release: |version|
:Date: |today|
This library reference manual documents Python's extensions for the Macintosh.
It should be used in conjunction with :ref:`library-index`, which documents the
standard library and built-in types.
This manual assumes basic knowledge about the Python language. For an informal
introduction to Python, see :ref:`tutorial-index`; :ref:`reference-index`
remains the highest authority on syntactic and semantic questions. Finally, the
manual entitled :ref:`extending-index` describes how to add new extensions to
Python and how to embed it in other applications.
.. toctree::
:maxdepth: 2
using.rst
mac.rst
macic.rst
macos.rst
macostools.rst
macui.rst
framework.rst
autogil.rst
scripting.rst
toolbox.rst
colorpicker.rst
undoc.rst

View File

@@ -1,50 +0,0 @@
:mod:`Carbon.Scrap` --- Scrap Manager
=====================================
.. module:: Carbon.Scrap
:platform: Mac
:synopsis: The Scrap Manager provides basic services for implementing cut & paste and
clipboard operations.
This module is only fully available on MacOS9 and earlier under classic PPC
MacPython. Very limited functionality is available under Carbon MacPython.
.. index:: single: Scrap Manager
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 :mod:`Scrap` module provides low-level access to the functions of the Scrap
Manager. It contains the following functions:
.. function:: InfoScrap()
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. |
+----------+---------------------------------------------+
.. seealso::
`Scrap Manager <http://developer.apple.com/documentation/mac/MoreToolbox/MoreToolbox-109.html>`_
Apple's documentation for the Scrap Manager gives a lot of useful information
about using the Scrap Manager in applications.

View File

@@ -1,130 +0,0 @@
.. _undocumented-modules:
********************
Undocumented Modules
********************
The modules in this chapter are poorly documented (if at all). If you wish to
contribute documentation of any of these modules, please get in touch with
`docs@python.org <mailto:docs@python.org>`_.
.. toctree::
:mod:`applesingle` --- AppleSingle decoder
==========================================
.. module:: applesingle
:platform: Mac
:synopsis: Rudimentary decoder for AppleSingle format files.
:mod:`buildtools` --- Helper module for BuildApplet and Friends
===============================================================
.. module:: buildtools
:platform: Mac
:synopsis: Helper module for BuildApplet, BuildApplication and macfreeze.
.. deprecated:: 2.4
:mod:`cfmfile` --- Code Fragment Resource module
================================================
.. module:: cfmfile
:platform: Mac
:synopsis: Code Fragment Resource module.
:mod:`cfmfile` is a module that understands Code Fragments and the accompanying
"cfrg" resources. It can parse them and merge them, and is used by
BuildApplication to combine all plugin modules to a single executable.
.. deprecated:: 2.4
:mod:`icopen` --- Internet Config replacement for :meth:`open`
==============================================================
.. module:: icopen
:platform: Mac
:synopsis: Internet Config replacement for open().
Importing :mod:`icopen` will replace the builtin :meth:`open` with a version
that uses Internet Config to set file type and creator for new files.
:mod:`macerrors` --- Mac OS Errors
==================================
.. module:: macerrors
:platform: Mac
:synopsis: Constant definitions for many Mac OS error codes.
:mod:`macerrors` contains constant definitions for many Mac OS error codes.
:mod:`macresource` --- Locate script resources
==============================================
.. module:: macresource
:platform: Mac
:synopsis: Locate script resources.
:mod:`macresource` helps scripts finding their resources, such as dialogs and
menus, without requiring special case code for when the script is run under
MacPython, as a MacPython applet or under OSX Python.
:mod:`Nav` --- NavServices calls
================================
.. module:: Nav
:platform: Mac
:synopsis: Interface to Navigation Services.
A low-level interface to Navigation Services.
:mod:`PixMapWrapper` --- Wrapper for PixMap objects
===================================================
.. module:: PixMapWrapper
:platform: Mac
:synopsis: Wrapper for PixMap objects.
:mod:`PixMapWrapper` wraps a PixMap object with a Python object that allows
access to the fields by name. It also has methods to convert to and from
:mod:`PIL` images.
:mod:`videoreader` --- Read QuickTime movies
============================================
.. module:: videoreader
:platform: Mac
:synopsis: Read QuickTime movies frame by frame for further processing.
:mod:`videoreader` reads and decodes QuickTime movies and passes a stream of
images to your program. It also provides some support for audio tracks.
:mod:`W` --- Widgets built on :mod:`FrameWork`
==============================================
.. module:: W
:platform: Mac
:synopsis: Widgets for the Mac, built on top of FrameWork.
The :mod:`W` widgets are used extensively in the :program:`IDE`.

View File

@@ -8,7 +8,6 @@
tutorial/index.rst tutorial/index.rst
reference/index.rst reference/index.rst
library/index.rst library/index.rst
maclib/index.rst
extending/index.rst extending/index.rst
c-api/index.rst c-api/index.rst
distutils/index.rst distutils/index.rst

View File

@@ -14,6 +14,7 @@ Currently, the HOWTOs are:
:maxdepth: 1 :maxdepth: 1
advocacy.rst advocacy.rst
pythonmac.rst
curses.rst curses.rst
doanddont.rst doanddont.rst
functional.rst functional.rst

View File

@@ -1,11 +1,11 @@
.. _using: .. _using-on-mac:
*************************** ***************************
Using Python on a Macintosh Using Python on a Macintosh
*************************** ***************************
.. sectionauthor:: Bob Savage <bobsavage@mac.com> :Author: Bob Savage <bobsavage@mac.com>
Python on a Macintosh running Mac OS X is in principle very similar to Python on Python on a Macintosh running Mac OS X is in principle very similar to Python on

View File

@@ -26,12 +26,6 @@ framework and Qt is in the QuickTime framework. The normal use pattern is ::
documentation of any of these modules, please get in touch with docs@python.org. documentation of any of these modules, please get in touch with docs@python.org.
.. toctree::
colorpicker.rst
.. % \section{Argument Handling for Toolbox Modules}
:mod:`Carbon.AE` --- Apple Events :mod:`Carbon.AE` --- Apple Events
================================= =================================
@@ -220,7 +214,49 @@ The ``CFBase``, ``CFArray``, ``CFData``, ``CFDictionary``, ``CFString`` and
.. module:: Carbon.Scrap .. module:: Carbon.Scrap
:platform: Mac :platform: Mac
:synopsis: Interface to the Carbon Scrap Manager. :synopsis: The Scrap Manager provides basic services for implementing cut & paste and
clipboard operations.
This module is only fully available on MacOS9 and earlier under classic PPC
MacPython. Very limited functionality is available under Carbon MacPython.
.. index:: single: Scrap Manager
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 :mod:`Scrap` module provides low-level access to the functions of the Scrap
Manager. It contains the following functions:
.. function:: InfoScrap()
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. |
+----------+---------------------------------------------+
.. seealso::
`Scrap Manager <http://developer.apple.com/documentation/mac/MoreToolbox/MoreToolbox-109.html>`_
Apple's documentation for the Scrap Manager gives a lot of useful information
about using the Scrap Manager in applications.

View File

@@ -24,6 +24,7 @@ in this chapter is:
linecache.rst linecache.rst
shutil.rst shutil.rst
dircache.rst dircache.rst
macpath.rst
.. seealso:: .. seealso::

View File

@@ -1,10 +1,10 @@
:mod:`ic` --- Access to Internet Config :mod:`ic` --- Access to the Mac OS X Internet Config
======================================= ====================================================
.. module:: ic .. module:: ic
:platform: Mac :platform: Mac
:synopsis: Access to Internet Config. :synopsis: Access to the Mac OS X Internet Config.
This module provides access to various internet-related preferences set through This module provides access to various internet-related preferences set through
@@ -117,4 +117,3 @@ methods:
Given an existing *file*, specified either as a filename or as an :func:`FSSpec` Given an existing *file*, specified either as a filename or as an :func:`FSSpec`
result, set its creator and type correctly based on its extension. The finder result, set its creator and type correctly based on its extension. The finder
is told about the change, so the finder icon will be updated quickly. is told about the change, so the finder icon will be updated quickly.

View File

@@ -76,4 +76,6 @@ over 2500 additional components available from the `Python Package Index
misc.rst misc.rst
windows.rst windows.rst
unix.rst unix.rst
mac.rst
macosa.rst
undoc.rst undoc.rst

19
Doc-3k/library/mac.rst Normal file
View File

@@ -0,0 +1,19 @@
*************************
MacOS X specific services
*************************
This chapter describes modules that are only available on the Mac OS X platform.
See also the chapters :ref:`mac-scripting` and :ref:`undoc-mac-modules`.
.. toctree::
ic.rst
macos.rst
macostools.rst
easydialogs.rst
framework.rst
autogil.rst
carbon.rst
colorpicker.rst

View File

@@ -1,5 +1,5 @@
.. _scripting: .. _mac-scripting:
********************* *********************
MacPython OSA Modules MacPython OSA Modules
@@ -78,14 +78,14 @@ according to a small number of rules:
Python also has support for creating scriptable applications in Python, but The Python also has support for creating scriptable applications in Python, but The
following modules are relevant to MacPython AppleScript support: following modules are relevant to MacPython AppleScript support:
.. toctree:: .. toctree::
gensuitemodule.rst gensuitemodule.rst
aetools.rst aetools.rst
aepack.rst aepack.rst
aetypes.rst aetypes.rst
miniae.rst miniaeframe.rst
In addition, support modules have been pre-generated for :mod:`Finder`, In addition, support modules have been pre-generated for :mod:`Finder`,
:mod:`Terminal`, :mod:`Explorer`, :mod:`Netscape`, :mod:`CodeWarrior`, :mod:`Terminal`, :mod:`Explorer`, :mod:`Netscape`, :mod:`CodeWarrior`,

View File

@@ -1,18 +1,14 @@
:mod:`macpath` --- MacOS path manipulation functions :mod:`macpath` --- MacOS 9 path manipulation functions
==================================================== ======================================================
.. module:: macpath .. module:: macpath
:synopsis: MacOS path manipulation functions. :synopsis: MacOS 9 path manipulation functions.
.. % Could be labeled \platform{Mac}, but the module should work anywhere and
.. % is distributed with the standard library.
This module is the Mac OS 9 (and earlier) implementation of the :mod:`os.path` This module is the Mac OS 9 (and earlier) implementation of the :mod:`os.path`
module. It can be used to manipulate old-style Macintosh pathnames on Mac OS X module. It can be used to manipulate old-style Macintosh pathnames on Mac OS X
(or any other platform). Refer to the Python Library Reference for documentation (or any other platform).
of :mod:`os.path`.
The following functions are available in this module: :func:`normcase`, The following functions are available in this module: :func:`normcase`,
:func:`normpath`, :func:`isabs`, :func:`join`, :func:`split`, :func:`isdir`, :func:`normpath`, :func:`isabs`, :func:`join`, :func:`split`, :func:`isdir`,

View File

@@ -14,15 +14,6 @@ Fredrik Lundh; the specific contents of this chapter have been substantially
revised. revised.
Frameworks
==========
Frameworks tend to be harder to document, but are well worth the effort spent.
None at this time.
Miscellaneous useful utilities Miscellaneous useful utilities
============================== ==============================
@@ -59,6 +50,115 @@ Multimedia
--- Interpret Sun audio headers (may become obsolete or a tool/demo). --- Interpret Sun audio headers (may become obsolete or a tool/demo).
.. _undoc-mac-modules:
Undocumented Mac OS modules
===========================
:mod:`applesingle` --- AppleSingle decoder
------------------------------------------
.. module:: applesingle
:platform: Mac
:synopsis: Rudimentary decoder for AppleSingle format files.
:mod:`buildtools` --- Helper module for BuildApplet and Friends
---------------------------------------------------------------
.. module:: buildtools
:platform: Mac
:synopsis: Helper module for BuildApplet, BuildApplication and macfreeze.
.. deprecated:: 2.4
:mod:`icopen` --- Internet Config replacement for :meth:`open`
--------------------------------------------------------------
.. module:: icopen
:platform: Mac
:synopsis: Internet Config replacement for open().
Importing :mod:`icopen` will replace the builtin :meth:`open` with a version
that uses Internet Config to set file type and creator for new files.
:mod:`macerrors` --- Mac OS Errors
----------------------------------
.. module:: macerrors
:platform: Mac
:synopsis: Constant definitions for many Mac OS error codes.
:mod:`macerrors` contains constant definitions for many Mac OS error codes.
:mod:`macresource` --- Locate script resources
----------------------------------------------
.. module:: macresource
:platform: Mac
:synopsis: Locate script resources.
:mod:`macresource` helps scripts finding their resources, such as dialogs and
menus, without requiring special case code for when the script is run under
MacPython, as a MacPython applet or under OSX Python.
:mod:`Nav` --- NavServices calls
--------------------------------
.. module:: Nav
:platform: Mac
:synopsis: Interface to Navigation Services.
A low-level interface to Navigation Services.
:mod:`PixMapWrapper` --- Wrapper for PixMap objects
---------------------------------------------------
.. module:: PixMapWrapper
:platform: Mac
:synopsis: Wrapper for PixMap objects.
:mod:`PixMapWrapper` wraps a PixMap object with a Python object that allows
access to the fields by name. It also has methods to convert to and from
:mod:`PIL` images.
:mod:`videoreader` --- Read QuickTime movies
--------------------------------------------
.. module:: videoreader
:platform: Mac
:synopsis: Read QuickTime movies frame by frame for further processing.
:mod:`videoreader` reads and decodes QuickTime movies and passes a stream of
images to your program. It also provides some support for audio tracks.
:mod:`W` --- Widgets built on :mod:`FrameWork`
----------------------------------------------
.. module:: W
:platform: Mac
:synopsis: Widgets for the Mac, built on top of FrameWork.
The :mod:`W` widgets are used extensively in the :program:`IDE`.
.. _obsolete-modules: .. _obsolete-modules:
Obsolete Obsolete

View File

@@ -1,34 +0,0 @@
.. _maclib-index:
##############################
Macintosh Library Modules
##############################
:Release: |version|
:Date: |today|
This library reference manual documents Python's extensions for the Macintosh.
It should be used in conjunction with :ref:`library-index`, which documents the
standard library and built-in types.
This manual assumes basic knowledge about the Python language. For an informal
introduction to Python, see :ref:`tutorial-index`; :ref:`reference-index`
remains the highest authority on syntactic and semantic questions. Finally, the
manual entitled :ref:`extending-index` describes how to add new extensions to
Python and how to embed it in other applications.
.. toctree::
:maxdepth: 2
using.rst
mac.rst
macic.rst
macos.rst
macostools.rst
macui.rst
framework.rst
autogil.rst
scripting.rst
toolbox.rst
colorpicker.rst
undoc.rst

View File

@@ -1,50 +0,0 @@
:mod:`Carbon.Scrap` --- Scrap Manager
=====================================
.. module:: Carbon.Scrap
:platform: Mac
:synopsis: The Scrap Manager provides basic services for implementing cut & paste and
clipboard operations.
This module is only fully available on MacOS9 and earlier under classic PPC
MacPython. Very limited functionality is available under Carbon MacPython.
.. index:: single: Scrap Manager
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 :mod:`Scrap` module provides low-level access to the functions of the Scrap
Manager. It contains the following functions:
.. function:: InfoScrap()
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. |
+----------+---------------------------------------------+
.. seealso::
`Scrap Manager <http://developer.apple.com/documentation/mac/MoreToolbox/MoreToolbox-109.html>`_
Apple's documentation for the Scrap Manager gives a lot of useful information
about using the Scrap Manager in applications.

View File

@@ -1,116 +0,0 @@
.. _undocumented-modules:
********************
Undocumented Modules
********************
The modules in this chapter are poorly documented (if at all). If you wish to
contribute documentation of any of these modules, please get in touch with
`docs@python.org <mailto:docs@python.org>`_.
.. toctree::
:mod:`applesingle` --- AppleSingle decoder
==========================================
.. module:: applesingle
:platform: Mac
:synopsis: Rudimentary decoder for AppleSingle format files.
:mod:`buildtools` --- Helper module for BuildApplet and Friends
===============================================================
.. module:: buildtools
:platform: Mac
:synopsis: Helper module for BuildApplet, BuildApplication and macfreeze.
.. deprecated:: 2.4
:mod:`icopen` --- Internet Config replacement for :meth:`open`
==============================================================
.. module:: icopen
:platform: Mac
:synopsis: Internet Config replacement for open().
Importing :mod:`icopen` will replace the builtin :meth:`open` with a version
that uses Internet Config to set file type and creator for new files.
:mod:`macerrors` --- Mac OS Errors
==================================
.. module:: macerrors
:platform: Mac
:synopsis: Constant definitions for many Mac OS error codes.
:mod:`macerrors` contains constant definitions for many Mac OS error codes.
:mod:`macresource` --- Locate script resources
==============================================
.. module:: macresource
:platform: Mac
:synopsis: Locate script resources.
:mod:`macresource` helps scripts finding their resources, such as dialogs and
menus, without requiring special case code for when the script is run under
MacPython, as a MacPython applet or under OSX Python.
:mod:`Nav` --- NavServices calls
================================
.. module:: Nav
:platform: Mac
:synopsis: Interface to Navigation Services.
A low-level interface to Navigation Services.
:mod:`PixMapWrapper` --- Wrapper for PixMap objects
===================================================
.. module:: PixMapWrapper
:platform: Mac
:synopsis: Wrapper for PixMap objects.
:mod:`PixMapWrapper` wraps a PixMap object with a Python object that allows
access to the fields by name. It also has methods to convert to and from
:mod:`PIL` images.
:mod:`videoreader` --- Read QuickTime movies
============================================
.. module:: videoreader
:platform: Mac
:synopsis: Read QuickTime movies frame by frame for further processing.
:mod:`videoreader` reads and decodes QuickTime movies and passes a stream of
images to your program. It also provides some support for audio tracks.
:mod:`W` --- Widgets built on :mod:`FrameWork`
==============================================
.. module:: W
:platform: Mac
:synopsis: Widgets for the Mac, built on top of FrameWork.
The :mod:`W` widgets are used extensively in the :program:`IDE`.

View File

@@ -10,13 +10,17 @@ check:
@$(PYTHON) utils/check_sources.py -i sphinx/style/jquery.js sphinx @$(PYTHON) utils/check_sources.py -i sphinx/style/jquery.js sphinx
@$(PYTHON) utils/check_sources.py converter @$(PYTHON) utils/check_sources.py converter
clean: clean-pyc clean: clean-pyc clean-patchfiles
clean-pyc: clean-pyc:
find . -name '*.pyc' -exec rm -f {} + find . -name '*.pyc' -exec rm -f {} +
find . -name '*.pyo' -exec rm -f {} + find . -name '*.pyo' -exec rm -f {} +
find . -name '*~' -exec rm -f {} + find . -name '*~' -exec rm -f {} +
clean-patchfiles:
find . -name '*.orig' -exec rm -f {} +
find . -name '*.rej' -exec rm -f {} +
pylint: pylint:
@pylint --rcfile utils/pylintrc sphinx converter @pylint --rcfile utils/pylintrc sphinx converter

View File

@@ -21,8 +21,6 @@
<span class="linkdescr">describes syntax and language elements</span></p> <span class="linkdescr">describes syntax and language elements</span></p>
<p class="biglink"><a class="biglink" href="{{ pathto("library/index.rst") }}">Library Reference</a><br> <p class="biglink"><a class="biglink" href="{{ pathto("library/index.rst") }}">Library Reference</a><br>
<span class="linkdescr">keep this under your pillow</span></p> <span class="linkdescr">keep this under your pillow</span></p>
<p class="biglink"><a class="biglink" href="{{ pathto("maclib/index.rst") }}">Macintosh Library Modules</a><br>
<span class="linkdescr">this too, if you use a Macintosh</span></p>
<p class="biglink"><a class="biglink" href="{{ pathto("howto/index.rst") }}">Python HOWTOs</a><br> <p class="biglink"><a class="biglink" href="{{ pathto("howto/index.rst") }}">Python HOWTOs</a><br>
<span class="linkdescr">in-depth documents on specific topics</span></p> <span class="linkdescr">in-depth documents on specific topics</span></p>
</td><td width="50%"> </td><td width="50%">

View File

@@ -25,7 +25,6 @@
{% for id, name, checked in [ {% for id, name, checked in [
('tutorial', 'Python Tutorial', true), ('tutorial', 'Python Tutorial', true),
('library', 'Library Reference', true), ('library', 'Library Reference', true),
('maclib', 'Macintosh Library Modules', false),
('reference', 'Language Reference', false), ('reference', 'Language Reference', false),
('extending', 'Extending and Embedding', false), ('extending', 'Extending and Embedding', false),
('c-api', 'Python/C API', false), ('c-api', 'Python/C API', false),

View File

@@ -60,9 +60,11 @@ def handle_html_url(req, url):
return 'bugs/' return 'bugs/'
if url == 'modindex.html' or url.endswith('/modindex.html'): if url == 'modindex.html' or url.endswith('/modindex.html'):
return 'modindex/' return 'modindex/'
# library, maclib if url == 'mac/using.html':
return 'howto/pythonmac/'
# library
if url[:4] in ('lib/', 'mac/'): if url[:4] in ('lib/', 'mac/'):
p = 'library/' if url[0] == 'l' else 'maclib/' p = 'library/'
m = _module_re.match(url[4:]) m = _module_re.match(url[4:])
if m: if m:
mn = m.group(1) mn = m.group(1)