Added 'list_only' option (and modified 'run()' to respect it).
[python/dscho.git] / Doc / mac / libmac.tex
blob1301c0102ea5fe1de704eb919eeb36eebdb63fef
1 \section{Introduction}
2 \label{intro}
4 The modules in this manual are available on the Apple Macintosh only.
6 Aside from the modules described here there are also interfaces to
7 various MacOS toolboxes, which are currently not extensively
8 described. The toolboxes for which modules exist are:
9 \module{AE} (Apple Events),
10 \module{Cm} (Component Manager),
11 \module{Ctl} (Control Manager),
12 \module{Dlg} (Dialog Manager),
13 \module{Evt} (Event Manager),
14 \module{Fm} (Font Manager),
15 \module{List} (List Manager),
16 \module{Menu} (Moenu Manager),
17 \module{Qd} (QuickDraw),
18 \module{Qt} (QuickTime),
19 \module{Res} (Resource Manager and Handles),
20 \module{Scrap} (Scrap Manager),
21 \module{Snd} (Sound Manager),
22 \module{TE} (TextEdit),
23 \module{Waste} (non-Apple \program{TextEdit} replacement) and
24 \module{Win} (Window Manager).
26 If applicable the module will define a number of Python objects for
27 the various structures declared by the toolbox, and operations will be
28 implemented as methods of the object. Other operations will be
29 implemented as functions in the module. Not all operations possible in
30 \C{} will also be possible in Python (callbacks are often a problem), and
31 parameters will occasionally be different in Python (input and output
32 buffers, especially). All methods and functions have a \code{__doc__}
33 string describing their arguments and return values, and for
34 additional description you are referred to \emph{Inside Macintosh} or
35 similar works.
37 The following modules are documented here:
39 \localmoduletable
42 \section{\module{mac} ---
43 Implementations for the \module{os} module}
45 \declaremodule{builtin}{mac}
46 \platform{Mac}
47 \modulesynopsis{Implementations for the \module{os} module.}
50 This module implements the operating system dependent functionality
51 provided by the standard module \module{os}\refstmodindex{os}. It is
52 best accessed through the \module{os} module.
54 The following functions are available in this module:
55 \function{chdir()},
56 \function{close()},
57 \function{dup()},
58 \function{fdopen()},
59 \function{getcwd()},
60 \function{lseek()},
61 \function{listdir()},
62 \function{mkdir()},
63 \function{open()},
64 \function{read()},
65 \function{rename()},
66 \function{rmdir()},
67 \function{stat()},
68 \function{sync()},
69 \function{unlink()},
70 \function{write()},
71 as well as the exception \exception{error}. Note that the times
72 returned by \function{stat()} are floating-point values, like all time
73 values in MacPython.
75 One additional function is available:
77 \begin{funcdesc}{xstat}{path}
78 This function returns the same information as \function{stat()}, but
79 with three additional values appended: the size of the resource fork
80 of the file and its 4-character creator and type.
81 \end{funcdesc}
84 \section{\module{macpath} ---
85 MacOS path manipulation functions}
87 \declaremodule{standard}{macpath}
88 % Could be labeled \platform{Mac}, but the module should work anywhere and
89 % is distributed with the standard library.
90 \modulesynopsis{MacOS path manipulation functions.}
93 This module is the Macintosh implementation of the \module{os.path}
94 module. It is most portably accessed as
95 \module{os.path}\refstmodindex{os.path}. Refer to the \emph{Python Library
96 Reference} for documentation of \module{os.path}.
98 The following functions are available in this module:
99 \function{normcase()},
100 \function{normpath()},
101 \function{isabs()},
102 \function{join()},
103 \function{split()},
104 \function{isdir()},
105 \function{isfile()},
106 \function{walk()},
107 \function{exists()}.
108 For other functions available in \module{os.path} dummy counterparts
109 are available.