Mercurial > cpython-lru_cache-weakref
annotate Doc/mac/libmacostools.tex @ 27998:e27f58a50737 legacy-trunk
SF bug #690377: Dud footnote reference in distutils docs
| author | Raymond Hettinger <python@rcn.com> |
|---|---|
| date | Fri, 21 Feb 2003 02:47:09 +0000 |
| parents | 523efd773261 |
| children | 47d64cb01820 |
| rev | line source |
|---|---|
| 8915 | 1 \section{\module{macostools} --- |
| 10334 | 2 Convenience routines for file manipulation} |
| 3 | |
|
8715
c750c7a21e03
Adjusted to use the new \declaremodule \modulesynopsis \localmoduletable
Fred Drake <fdrake@acm.org>
parents:
7877
diff
changeset
|
4 \declaremodule{standard}{macostools} |
| 10334 | 5 \platform{Mac} |
|
8715
c750c7a21e03
Adjusted to use the new \declaremodule \modulesynopsis \localmoduletable
Fred Drake <fdrake@acm.org>
parents:
7877
diff
changeset
|
6 \modulesynopsis{Convenience routines for file manipulation.} |
|
c750c7a21e03
Adjusted to use the new \declaremodule \modulesynopsis \localmoduletable
Fred Drake <fdrake@acm.org>
parents:
7877
diff
changeset
|
7 |
|
3194
05aeb91e3b90
Documented MACFS, macostools, EasyDialogs and FrameWork modules.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
8 |
|
05aeb91e3b90
Documented MACFS, macostools, EasyDialogs and FrameWork modules.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
9 This module contains some convenience routines for file-manipulation |
|
27833
523efd773261
Updated the Mac documentation to the current state of affairs.
Jack Jansen <jack.jansen@cwi.nl>
parents:
24617
diff
changeset
|
10 on the Macintosh. All file parameters can be specified as |
|
523efd773261
Updated the Mac documentation to the current state of affairs.
Jack Jansen <jack.jansen@cwi.nl>
parents:
24617
diff
changeset
|
11 pathnames, \class{FSRef} or \class{FSSpec} objects. |
|
3194
05aeb91e3b90
Documented MACFS, macostools, EasyDialogs and FrameWork modules.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
12 |
|
7833
643e9728aa49
Lots of markup consistency nits.
Fred Drake <fdrake@acm.org>
parents:
7712
diff
changeset
|
13 The \module{macostools} module defines the following functions: |
|
3194
05aeb91e3b90
Documented MACFS, macostools, EasyDialogs and FrameWork modules.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
14 |
|
05aeb91e3b90
Documented MACFS, macostools, EasyDialogs and FrameWork modules.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
15 |
|
7833
643e9728aa49
Lots of markup consistency nits.
Fred Drake <fdrake@acm.org>
parents:
7712
diff
changeset
|
16 \begin{funcdesc}{copy}{src, dst\optional{, createpath\optional{, copytimes}}} |
|
27833
523efd773261
Updated the Mac documentation to the current state of affairs.
Jack Jansen <jack.jansen@cwi.nl>
parents:
24617
diff
changeset
|
17 Copy file \var{src} to \var{dst}. If \var{createpath} is non-zero |
|
24617
dbc0f2f11414
Changed a sentence that confused some people.
Jack Jansen <jack.jansen@cwi.nl>
parents:
19824
diff
changeset
|
18 the folders leading to \var{dst} are created if necessary. |
|
dbc0f2f11414
Changed a sentence that confused some people.
Jack Jansen <jack.jansen@cwi.nl>
parents:
19824
diff
changeset
|
19 The method copies data and |
|
4410
4cef23e1dcca
Patches for Mac module docs by Jack
Guido van Rossum <guido@python.org>
parents:
3194
diff
changeset
|
20 resource fork and some finder information (creator, type, flags) and |
|
4cef23e1dcca
Patches for Mac module docs by Jack
Guido van Rossum <guido@python.org>
parents:
3194
diff
changeset
|
21 optionally the creation, modification and backup times (default is to |
|
4cef23e1dcca
Patches for Mac module docs by Jack
Guido van Rossum <guido@python.org>
parents:
3194
diff
changeset
|
22 copy them). Custom icons, comments and icon position are not copied. |
|
3194
05aeb91e3b90
Documented MACFS, macostools, EasyDialogs and FrameWork modules.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
23 \end{funcdesc} |
|
05aeb91e3b90
Documented MACFS, macostools, EasyDialogs and FrameWork modules.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
24 |
|
7712
0cbc9df882b6
Change "\," to just "," in function signatures. This is easier to maintain,
Fred Drake <fdrake@acm.org>
parents:
7393
diff
changeset
|
25 \begin{funcdesc}{copytree}{src, dst} |
|
3194
05aeb91e3b90
Documented MACFS, macostools, EasyDialogs and FrameWork modules.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
26 Recursively copy a file tree from \var{src} to \var{dst}, creating |
|
7833
643e9728aa49
Lots of markup consistency nits.
Fred Drake <fdrake@acm.org>
parents:
7712
diff
changeset
|
27 folders as needed. \var{src} and \var{dst} should be specified as |
|
3194
05aeb91e3b90
Documented MACFS, macostools, EasyDialogs and FrameWork modules.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
28 pathnames. |
|
05aeb91e3b90
Documented MACFS, macostools, EasyDialogs and FrameWork modules.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
29 \end{funcdesc} |
|
05aeb91e3b90
Documented MACFS, macostools, EasyDialogs and FrameWork modules.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
30 |
|
7712
0cbc9df882b6
Change "\," to just "," in function signatures. This is easier to maintain,
Fred Drake <fdrake@acm.org>
parents:
7393
diff
changeset
|
31 \begin{funcdesc}{mkalias}{src, dst} |
|
27833
523efd773261
Updated the Mac documentation to the current state of affairs.
Jack Jansen <jack.jansen@cwi.nl>
parents:
24617
diff
changeset
|
32 Create a finder alias \var{dst} pointing to \var{src}. |
|
3194
05aeb91e3b90
Documented MACFS, macostools, EasyDialogs and FrameWork modules.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
33 \end{funcdesc} |
|
05aeb91e3b90
Documented MACFS, macostools, EasyDialogs and FrameWork modules.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
34 |
|
4410
4cef23e1dcca
Patches for Mac module docs by Jack
Guido van Rossum <guido@python.org>
parents:
3194
diff
changeset
|
35 \begin{funcdesc}{touched}{dst} |
|
4cef23e1dcca
Patches for Mac module docs by Jack
Guido van Rossum <guido@python.org>
parents:
3194
diff
changeset
|
36 Tell the finder that some bits of finder-information such as creator |
|
4cef23e1dcca
Patches for Mac module docs by Jack
Guido van Rossum <guido@python.org>
parents:
3194
diff
changeset
|
37 or type for file \var{dst} has changed. The file can be specified by |
|
15226
487b3502a45b
Chris Barker <cbarker@jps.net>:
Fred Drake <fdrake@acm.org>
parents:
10334
diff
changeset
|
38 pathname or fsspec. This call should tell the finder to redraw the |
|
4410
4cef23e1dcca
Patches for Mac module docs by Jack
Guido van Rossum <guido@python.org>
parents:
3194
diff
changeset
|
39 files icon. |
|
4cef23e1dcca
Patches for Mac module docs by Jack
Guido van Rossum <guido@python.org>
parents:
3194
diff
changeset
|
40 \end{funcdesc} |
|
4cef23e1dcca
Patches for Mac module docs by Jack
Guido van Rossum <guido@python.org>
parents:
3194
diff
changeset
|
41 |
|
3194
05aeb91e3b90
Documented MACFS, macostools, EasyDialogs and FrameWork modules.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
42 \begin{datadesc}{BUFSIZ} |
|
05aeb91e3b90
Documented MACFS, macostools, EasyDialogs and FrameWork modules.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
43 The buffer size for \code{copy}, default 1 megabyte. |
|
05aeb91e3b90
Documented MACFS, macostools, EasyDialogs and FrameWork modules.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
44 \end{datadesc} |
|
05aeb91e3b90
Documented MACFS, macostools, EasyDialogs and FrameWork modules.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
45 |
|
05aeb91e3b90
Documented MACFS, macostools, EasyDialogs and FrameWork modules.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
46 Note that the process of creating finder aliases is not specified in |
|
7833
643e9728aa49
Lots of markup consistency nits.
Fred Drake <fdrake@acm.org>
parents:
7712
diff
changeset
|
47 the Apple documentation. Hence, aliases created with \function{mkalias()} |
|
3194
05aeb91e3b90
Documented MACFS, macostools, EasyDialogs and FrameWork modules.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
48 could conceivably have incompatible behaviour in some cases. |
|
4410
4cef23e1dcca
Patches for Mac module docs by Jack
Guido van Rossum <guido@python.org>
parents:
3194
diff
changeset
|
49 |
| 10334 | 50 |
| 8915 | 51 \section{\module{findertools} --- |
| 10334 | 52 The \program{finder}'s Apple Events interface} |
| 53 | |
|
8715
c750c7a21e03
Adjusted to use the new \declaremodule \modulesynopsis \localmoduletable
Fred Drake <fdrake@acm.org>
parents:
7877
diff
changeset
|
54 \declaremodule{standard}{findertools} |
| 10334 | 55 \platform{Mac} |
|
8715
c750c7a21e03
Adjusted to use the new \declaremodule \modulesynopsis \localmoduletable
Fred Drake <fdrake@acm.org>
parents:
7877
diff
changeset
|
56 \modulesynopsis{Wrappers around the \program{finder}'s Apple Events interface.} |
|
c750c7a21e03
Adjusted to use the new \declaremodule \modulesynopsis \localmoduletable
Fred Drake <fdrake@acm.org>
parents:
7877
diff
changeset
|
57 |
|
4410
4cef23e1dcca
Patches for Mac module docs by Jack
Guido van Rossum <guido@python.org>
parents:
3194
diff
changeset
|
58 |
|
4cef23e1dcca
Patches for Mac module docs by Jack
Guido van Rossum <guido@python.org>
parents:
3194
diff
changeset
|
59 This module contains routines that give Python programs access to some |
|
4cef23e1dcca
Patches for Mac module docs by Jack
Guido van Rossum <guido@python.org>
parents:
3194
diff
changeset
|
60 functionality provided by the finder. They are implemented as wrappers |
|
7833
643e9728aa49
Lots of markup consistency nits.
Fred Drake <fdrake@acm.org>
parents:
7712
diff
changeset
|
61 around the AppleEvent\index{AppleEvents} interface to the finder. |
|
4410
4cef23e1dcca
Patches for Mac module docs by Jack
Guido van Rossum <guido@python.org>
parents:
3194
diff
changeset
|
62 |
|
4cef23e1dcca
Patches for Mac module docs by Jack
Guido van Rossum <guido@python.org>
parents:
3194
diff
changeset
|
63 All file and folder parameters can be specified either as full |
|
27833
523efd773261
Updated the Mac documentation to the current state of affairs.
Jack Jansen <jack.jansen@cwi.nl>
parents:
24617
diff
changeset
|
64 pathnames, or as \class{FSRef} or \class{FSSpec} objects. |
|
4410
4cef23e1dcca
Patches for Mac module docs by Jack
Guido van Rossum <guido@python.org>
parents:
3194
diff
changeset
|
65 |
|
7833
643e9728aa49
Lots of markup consistency nits.
Fred Drake <fdrake@acm.org>
parents:
7712
diff
changeset
|
66 The \module{findertools} module defines the following functions: |
|
4410
4cef23e1dcca
Patches for Mac module docs by Jack
Guido van Rossum <guido@python.org>
parents:
3194
diff
changeset
|
67 |
|
4cef23e1dcca
Patches for Mac module docs by Jack
Guido van Rossum <guido@python.org>
parents:
3194
diff
changeset
|
68 |
|
4cef23e1dcca
Patches for Mac module docs by Jack
Guido van Rossum <guido@python.org>
parents:
3194
diff
changeset
|
69 \begin{funcdesc}{launch}{file} |
|
4cef23e1dcca
Patches for Mac module docs by Jack
Guido van Rossum <guido@python.org>
parents:
3194
diff
changeset
|
70 Tell the finder to launch \var{file}. What launching means depends on the file: |
|
4cef23e1dcca
Patches for Mac module docs by Jack
Guido van Rossum <guido@python.org>
parents:
3194
diff
changeset
|
71 applications are started, folders are opened and documents are opened |
|
4cef23e1dcca
Patches for Mac module docs by Jack
Guido van Rossum <guido@python.org>
parents:
3194
diff
changeset
|
72 in the correct application. |
|
4cef23e1dcca
Patches for Mac module docs by Jack
Guido van Rossum <guido@python.org>
parents:
3194
diff
changeset
|
73 \end{funcdesc} |
|
4cef23e1dcca
Patches for Mac module docs by Jack
Guido van Rossum <guido@python.org>
parents:
3194
diff
changeset
|
74 |
|
4cef23e1dcca
Patches for Mac module docs by Jack
Guido van Rossum <guido@python.org>
parents:
3194
diff
changeset
|
75 \begin{funcdesc}{Print}{file} |
|
27833
523efd773261
Updated the Mac documentation to the current state of affairs.
Jack Jansen <jack.jansen@cwi.nl>
parents:
24617
diff
changeset
|
76 Tell the finder to print a file. The behaviour is identical to selecting the file and using |
|
15226
487b3502a45b
Chris Barker <cbarker@jps.net>:
Fred Drake <fdrake@acm.org>
parents:
10334
diff
changeset
|
77 the print command in the finder's file menu. |
|
4410
4cef23e1dcca
Patches for Mac module docs by Jack
Guido van Rossum <guido@python.org>
parents:
3194
diff
changeset
|
78 \end{funcdesc} |
|
4cef23e1dcca
Patches for Mac module docs by Jack
Guido van Rossum <guido@python.org>
parents:
3194
diff
changeset
|
79 |
|
4cef23e1dcca
Patches for Mac module docs by Jack
Guido van Rossum <guido@python.org>
parents:
3194
diff
changeset
|
80 \begin{funcdesc}{copy}{file, destdir} |
|
4cef23e1dcca
Patches for Mac module docs by Jack
Guido van Rossum <guido@python.org>
parents:
3194
diff
changeset
|
81 Tell the finder to copy a file or folder \var{file} to folder |
|
27833
523efd773261
Updated the Mac documentation to the current state of affairs.
Jack Jansen <jack.jansen@cwi.nl>
parents:
24617
diff
changeset
|
82 \var{destdir}. The function returns an \class{Alias} object pointing to |
|
4410
4cef23e1dcca
Patches for Mac module docs by Jack
Guido van Rossum <guido@python.org>
parents:
3194
diff
changeset
|
83 the new file. |
|
4cef23e1dcca
Patches for Mac module docs by Jack
Guido van Rossum <guido@python.org>
parents:
3194
diff
changeset
|
84 \end{funcdesc} |
|
4cef23e1dcca
Patches for Mac module docs by Jack
Guido van Rossum <guido@python.org>
parents:
3194
diff
changeset
|
85 |
|
4cef23e1dcca
Patches for Mac module docs by Jack
Guido van Rossum <guido@python.org>
parents:
3194
diff
changeset
|
86 \begin{funcdesc}{move}{file, destdir} |
|
4cef23e1dcca
Patches for Mac module docs by Jack
Guido van Rossum <guido@python.org>
parents:
3194
diff
changeset
|
87 Tell the finder to move a file or folder \var{file} to folder |
|
27833
523efd773261
Updated the Mac documentation to the current state of affairs.
Jack Jansen <jack.jansen@cwi.nl>
parents:
24617
diff
changeset
|
88 \var{destdir}. The function returns an \class{Alias} object pointing to |
|
4410
4cef23e1dcca
Patches for Mac module docs by Jack
Guido van Rossum <guido@python.org>
parents:
3194
diff
changeset
|
89 the new file. |
|
4cef23e1dcca
Patches for Mac module docs by Jack
Guido van Rossum <guido@python.org>
parents:
3194
diff
changeset
|
90 \end{funcdesc} |
|
4cef23e1dcca
Patches for Mac module docs by Jack
Guido van Rossum <guido@python.org>
parents:
3194
diff
changeset
|
91 |
|
4cef23e1dcca
Patches for Mac module docs by Jack
Guido van Rossum <guido@python.org>
parents:
3194
diff
changeset
|
92 \begin{funcdesc}{sleep}{} |
|
7833
643e9728aa49
Lots of markup consistency nits.
Fred Drake <fdrake@acm.org>
parents:
7712
diff
changeset
|
93 Tell the finder to put the Macintosh to sleep, if your machine |
|
643e9728aa49
Lots of markup consistency nits.
Fred Drake <fdrake@acm.org>
parents:
7712
diff
changeset
|
94 supports it. |
|
4410
4cef23e1dcca
Patches for Mac module docs by Jack
Guido van Rossum <guido@python.org>
parents:
3194
diff
changeset
|
95 \end{funcdesc} |
|
4cef23e1dcca
Patches for Mac module docs by Jack
Guido van Rossum <guido@python.org>
parents:
3194
diff
changeset
|
96 |
|
4cef23e1dcca
Patches for Mac module docs by Jack
Guido van Rossum <guido@python.org>
parents:
3194
diff
changeset
|
97 \begin{funcdesc}{restart}{} |
|
4cef23e1dcca
Patches for Mac module docs by Jack
Guido van Rossum <guido@python.org>
parents:
3194
diff
changeset
|
98 Tell the finder to perform an orderly restart of the machine. |
|
4cef23e1dcca
Patches for Mac module docs by Jack
Guido van Rossum <guido@python.org>
parents:
3194
diff
changeset
|
99 \end{funcdesc} |
|
4cef23e1dcca
Patches for Mac module docs by Jack
Guido van Rossum <guido@python.org>
parents:
3194
diff
changeset
|
100 |
|
4cef23e1dcca
Patches for Mac module docs by Jack
Guido van Rossum <guido@python.org>
parents:
3194
diff
changeset
|
101 \begin{funcdesc}{shutdown}{} |
|
4cef23e1dcca
Patches for Mac module docs by Jack
Guido van Rossum <guido@python.org>
parents:
3194
diff
changeset
|
102 Tell the finder to perform an orderly shutdown of the machine. |
|
4cef23e1dcca
Patches for Mac module docs by Jack
Guido van Rossum <guido@python.org>
parents:
3194
diff
changeset
|
103 \end{funcdesc} |
