Mercurial > cpython-lru_cache-weakref
annotate Doc/mac/libmac.tex @ 5817:48b94de85bf3 legacy-trunk
Extensive changes by AMK.
| author | Guido van Rossum <guido@python.org> |
|---|---|
| date | Thu, 17 Jul 1997 16:29:42 +0000 |
| parents | 4cef23e1dcca |
| children | 9f1d3eeb784b |
| rev | line source |
|---|---|
|
2609
7ef72873e4d6
restructured library manual accordiung to functional group
Guido van Rossum <guido@python.org>
parents:
2576
diff
changeset
|
1 \chapter{Macintosh Specific Services} |
|
1471
2ec96140a36b
Restructured library documentation
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
2 |
|
2453
cdd3a721b40e
a few typographical changes (e.g. -- => ---) and lots of new stuff in the WWW chapter
Guido van Rossum <guido@python.org>
parents:
1471
diff
changeset
|
3 The modules in this chapter are available on the Apple Macintosh only. |
|
1471
2ec96140a36b
Restructured library documentation
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
4 |
|
3758
b916d614e363
changes by Jack to Mac docs
Guido van Rossum <guido@python.org>
parents:
2609
diff
changeset
|
5 Aside from the modules described here there are also interfaces to |
|
b916d614e363
changes by Jack to Mac docs
Guido van Rossum <guido@python.org>
parents:
2609
diff
changeset
|
6 various MacOS toolboxes, which are currently not extensively |
|
b916d614e363
changes by Jack to Mac docs
Guido van Rossum <guido@python.org>
parents:
2609
diff
changeset
|
7 described. The toolboxes for which modules exist are: |
|
b916d614e363
changes by Jack to Mac docs
Guido van Rossum <guido@python.org>
parents:
2609
diff
changeset
|
8 \code{AE} (Apple Events), |
|
b916d614e363
changes by Jack to Mac docs
Guido van Rossum <guido@python.org>
parents:
2609
diff
changeset
|
9 \code{Cm} (Component Manager), |
|
b916d614e363
changes by Jack to Mac docs
Guido van Rossum <guido@python.org>
parents:
2609
diff
changeset
|
10 \code{Ctl} (Control Manager), |
|
b916d614e363
changes by Jack to Mac docs
Guido van Rossum <guido@python.org>
parents:
2609
diff
changeset
|
11 \code{Dlg} (Dialog Manager), |
|
b916d614e363
changes by Jack to Mac docs
Guido van Rossum <guido@python.org>
parents:
2609
diff
changeset
|
12 \code{Evt} (Event Manager), |
|
b916d614e363
changes by Jack to Mac docs
Guido van Rossum <guido@python.org>
parents:
2609
diff
changeset
|
13 \code{Fm} (Font Manager), |
|
b916d614e363
changes by Jack to Mac docs
Guido van Rossum <guido@python.org>
parents:
2609
diff
changeset
|
14 \code{List} (List Manager), |
|
b916d614e363
changes by Jack to Mac docs
Guido van Rossum <guido@python.org>
parents:
2609
diff
changeset
|
15 \code{Menu} (Moenu Manager), |
|
b916d614e363
changes by Jack to Mac docs
Guido van Rossum <guido@python.org>
parents:
2609
diff
changeset
|
16 \code{Qd} (QuickDraw), |
|
b916d614e363
changes by Jack to Mac docs
Guido van Rossum <guido@python.org>
parents:
2609
diff
changeset
|
17 \code{Qt} (QuickTime), |
|
b916d614e363
changes by Jack to Mac docs
Guido van Rossum <guido@python.org>
parents:
2609
diff
changeset
|
18 \code{Res} (Resource Manager and Handles), |
|
b916d614e363
changes by Jack to Mac docs
Guido van Rossum <guido@python.org>
parents:
2609
diff
changeset
|
19 \code{Scrap} (Scrap Manager), |
|
b916d614e363
changes by Jack to Mac docs
Guido van Rossum <guido@python.org>
parents:
2609
diff
changeset
|
20 \code{Snd} (Sound Manager), |
|
b916d614e363
changes by Jack to Mac docs
Guido van Rossum <guido@python.org>
parents:
2609
diff
changeset
|
21 \code{TE} (TextEdit), |
|
b916d614e363
changes by Jack to Mac docs
Guido van Rossum <guido@python.org>
parents:
2609
diff
changeset
|
22 \code{Waste} (non-Apple TextEdit replacement) and |
|
b916d614e363
changes by Jack to Mac docs
Guido van Rossum <guido@python.org>
parents:
2609
diff
changeset
|
23 \code{Win} (Window Manager). |
|
b916d614e363
changes by Jack to Mac docs
Guido van Rossum <guido@python.org>
parents:
2609
diff
changeset
|
24 |
|
b916d614e363
changes by Jack to Mac docs
Guido van Rossum <guido@python.org>
parents:
2609
diff
changeset
|
25 If applicable the module will define a number of Python objects for |
|
b916d614e363
changes by Jack to Mac docs
Guido van Rossum <guido@python.org>
parents:
2609
diff
changeset
|
26 the various structures declared by the toolbox, and operations will be |
|
b916d614e363
changes by Jack to Mac docs
Guido van Rossum <guido@python.org>
parents:
2609
diff
changeset
|
27 implemented as methods of the object. Other operations will be |
|
b916d614e363
changes by Jack to Mac docs
Guido van Rossum <guido@python.org>
parents:
2609
diff
changeset
|
28 implemented as functions in the module. Not all operations possible in |
|
b916d614e363
changes by Jack to Mac docs
Guido van Rossum <guido@python.org>
parents:
2609
diff
changeset
|
29 C will also be possible in Python (callbacks are often a problem), and |
|
b916d614e363
changes by Jack to Mac docs
Guido van Rossum <guido@python.org>
parents:
2609
diff
changeset
|
30 parameters will occasionally be different in Python (input and output |
|
b916d614e363
changes by Jack to Mac docs
Guido van Rossum <guido@python.org>
parents:
2609
diff
changeset
|
31 buffers, especially). All methods and functions have a \code{__doc__} |
|
b916d614e363
changes by Jack to Mac docs
Guido van Rossum <guido@python.org>
parents:
2609
diff
changeset
|
32 string describing their arguments and return values, and for |
|
b916d614e363
changes by Jack to Mac docs
Guido van Rossum <guido@python.org>
parents:
2609
diff
changeset
|
33 additional description you are referred to Inside Mac or similar |
|
b916d614e363
changes by Jack to Mac docs
Guido van Rossum <guido@python.org>
parents:
2609
diff
changeset
|
34 works. |
|
b916d614e363
changes by Jack to Mac docs
Guido van Rossum <guido@python.org>
parents:
2609
diff
changeset
|
35 |
|
2576
f47bc5554418
mass changes; fix titles; add examples; correct typos; clarifications;
Guido van Rossum <guido@python.org>
parents:
2462
diff
changeset
|
36 \section{Built-in Module \sectcode{mac}} |
|
1471
2ec96140a36b
Restructured library documentation
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
37 |
|
2ec96140a36b
Restructured library documentation
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
38 \bimodindex{mac} |
|
2ec96140a36b
Restructured library documentation
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
39 This module provides a subset of the operating system dependent |
|
2ec96140a36b
Restructured library documentation
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
40 functionality provided by the optional built-in module \code{posix}. |
|
2ec96140a36b
Restructured library documentation
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
41 It is best accessed through the more portable standard module |
|
2ec96140a36b
Restructured library documentation
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
42 \code{os}. |
|
2ec96140a36b
Restructured library documentation
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
43 |
|
2ec96140a36b
Restructured library documentation
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
44 The following functions are available in this module: |
|
2ec96140a36b
Restructured library documentation
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
45 \code{chdir}, |
|
3758
b916d614e363
changes by Jack to Mac docs
Guido van Rossum <guido@python.org>
parents:
2609
diff
changeset
|
46 \code{close}, |
|
b916d614e363
changes by Jack to Mac docs
Guido van Rossum <guido@python.org>
parents:
2609
diff
changeset
|
47 \code{dup}, |
|
b916d614e363
changes by Jack to Mac docs
Guido van Rossum <guido@python.org>
parents:
2609
diff
changeset
|
48 \code{fdopen}, |
|
1471
2ec96140a36b
Restructured library documentation
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
49 \code{getcwd}, |
|
3758
b916d614e363
changes by Jack to Mac docs
Guido van Rossum <guido@python.org>
parents:
2609
diff
changeset
|
50 \code{lseek}, |
|
1471
2ec96140a36b
Restructured library documentation
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
51 \code{listdir}, |
|
2ec96140a36b
Restructured library documentation
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
52 \code{mkdir}, |
|
3758
b916d614e363
changes by Jack to Mac docs
Guido van Rossum <guido@python.org>
parents:
2609
diff
changeset
|
53 \code{open}, |
|
b916d614e363
changes by Jack to Mac docs
Guido van Rossum <guido@python.org>
parents:
2609
diff
changeset
|
54 \code{read}, |
|
1471
2ec96140a36b
Restructured library documentation
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
55 \code{rename}, |
|
2ec96140a36b
Restructured library documentation
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
56 \code{rmdir}, |
|
2ec96140a36b
Restructured library documentation
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
57 \code{stat}, |
|
2ec96140a36b
Restructured library documentation
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
58 \code{sync}, |
|
2ec96140a36b
Restructured library documentation
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
59 \code{unlink}, |
|
3758
b916d614e363
changes by Jack to Mac docs
Guido van Rossum <guido@python.org>
parents:
2609
diff
changeset
|
60 \code{write}, |
|
4410
4cef23e1dcca
Patches for Mac module docs by Jack
Guido van Rossum <guido@python.org>
parents:
3758
diff
changeset
|
61 as well as the exception \code{error}. Note that the times returned by |
|
4cef23e1dcca
Patches for Mac module docs by Jack
Guido van Rossum <guido@python.org>
parents:
3758
diff
changeset
|
62 \code{stat} are floating-point values, like all time values in |
|
4cef23e1dcca
Patches for Mac module docs by Jack
Guido van Rossum <guido@python.org>
parents:
3758
diff
changeset
|
63 MacPython. |
|
4cef23e1dcca
Patches for Mac module docs by Jack
Guido van Rossum <guido@python.org>
parents:
3758
diff
changeset
|
64 |
|
4cef23e1dcca
Patches for Mac module docs by Jack
Guido van Rossum <guido@python.org>
parents:
3758
diff
changeset
|
65 One additional function is available: \code{xstat}. This function |
|
4cef23e1dcca
Patches for Mac module docs by Jack
Guido van Rossum <guido@python.org>
parents:
3758
diff
changeset
|
66 returns the same information as \code{stat}, but with three extra |
|
4cef23e1dcca
Patches for Mac module docs by Jack
Guido van Rossum <guido@python.org>
parents:
3758
diff
changeset
|
67 values appended: the size of the resource fork of the file and its |
|
4cef23e1dcca
Patches for Mac module docs by Jack
Guido van Rossum <guido@python.org>
parents:
3758
diff
changeset
|
68 4-char creator and type. |
|
1471
2ec96140a36b
Restructured library documentation
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
69 |
|
2576
f47bc5554418
mass changes; fix titles; add examples; correct typos; clarifications;
Guido van Rossum <guido@python.org>
parents:
2462
diff
changeset
|
70 \section{Standard Module \sectcode{macpath}} |
|
1471
2ec96140a36b
Restructured library documentation
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
71 |
|
2ec96140a36b
Restructured library documentation
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
72 \stmodindex{macpath} |
|
2ec96140a36b
Restructured library documentation
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
73 This module provides a subset of the pathname manipulation functions |
|
2ec96140a36b
Restructured library documentation
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
74 available from the optional standard module \code{posixpath}. It is |
|
2ec96140a36b
Restructured library documentation
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
75 best accessed through the more portable standard module \code{os}, as |
|
2ec96140a36b
Restructured library documentation
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
76 \code{os.path}. |
|
2ec96140a36b
Restructured library documentation
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
77 |
|
2ec96140a36b
Restructured library documentation
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
78 The following functions are available in this module: |
|
2ec96140a36b
Restructured library documentation
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
79 \code{normcase}, |
|
3758
b916d614e363
changes by Jack to Mac docs
Guido van Rossum <guido@python.org>
parents:
2609
diff
changeset
|
80 \code{normpath}, |
|
1471
2ec96140a36b
Restructured library documentation
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
81 \code{isabs}, |
|
2ec96140a36b
Restructured library documentation
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
82 \code{join}, |
|
2ec96140a36b
Restructured library documentation
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
83 \code{split}, |
|
2ec96140a36b
Restructured library documentation
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
84 \code{isdir}, |
|
2ec96140a36b
Restructured library documentation
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
85 \code{isfile}, |
|
3758
b916d614e363
changes by Jack to Mac docs
Guido van Rossum <guido@python.org>
parents:
2609
diff
changeset
|
86 \code{walk}, |
|
1471
2ec96140a36b
Restructured library documentation
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
87 \code{exists}. |
|
3758
b916d614e363
changes by Jack to Mac docs
Guido van Rossum <guido@python.org>
parents:
2609
diff
changeset
|
88 For other functions available in \code{posixpath} dummy counterparts |
|
b916d614e363
changes by Jack to Mac docs
Guido van Rossum <guido@python.org>
parents:
2609
diff
changeset
|
89 are available. |
