Fred Drake | c817e27 | 1998-08-10 18:40:22 +0000 | [diff] [blame] | 1 | \section{\module{mac} --- |
Fred Drake | 59d8b73 | 1999-02-01 20:19:38 +0000 | [diff] [blame] | 2 | Implementations for the \module{os} module} |
Fred Drake | fe7f3bc | 1998-07-23 17:55:31 +0000 | [diff] [blame] | 3 | |
Fred Drake | f6863c1 | 1999-03-02 16:37:17 +0000 | [diff] [blame] | 4 | \declaremodule{builtin}{mac} |
| 5 | \platform{Mac} |
Fred Drake | 59d8b73 | 1999-02-01 20:19:38 +0000 | [diff] [blame] | 6 | \modulesynopsis{Implementations for the \module{os} module.} |
Fred Drake | fe7f3bc | 1998-07-23 17:55:31 +0000 | [diff] [blame] | 7 | |
Fred Drake | 55fca54 | 1998-02-18 15:21:26 +0000 | [diff] [blame] | 8 | |
Jack Jansen | 7aeba45 | 2003-02-12 09:58:33 +0000 | [diff] [blame] | 9 | This module implements the Mac OS 9 operating system dependent functionality |
Fred Drake | 59d8b73 | 1999-02-01 20:19:38 +0000 | [diff] [blame] | 10 | provided by the standard module \module{os}\refstmodindex{os}. It is |
Jack Jansen | 7aeba45 | 2003-02-12 09:58:33 +0000 | [diff] [blame] | 11 | best accessed through the \module{os} module. This module is only available in |
| 12 | MacPython-OS9, on MacPython-OSX \module{posix} is used. |
Guido van Rossum | 5fdeeea | 1994-01-02 01:22:07 +0000 | [diff] [blame] | 13 | |
| 14 | The following functions are available in this module: |
Fred Drake | 55fca54 | 1998-02-18 15:21:26 +0000 | [diff] [blame] | 15 | \function{chdir()}, |
| 16 | \function{close()}, |
| 17 | \function{dup()}, |
| 18 | \function{fdopen()}, |
| 19 | \function{getcwd()}, |
| 20 | \function{lseek()}, |
| 21 | \function{listdir()}, |
| 22 | \function{mkdir()}, |
| 23 | \function{open()}, |
| 24 | \function{read()}, |
| 25 | \function{rename()}, |
| 26 | \function{rmdir()}, |
| 27 | \function{stat()}, |
| 28 | \function{sync()}, |
| 29 | \function{unlink()}, |
| 30 | \function{write()}, |
| 31 | as well as the exception \exception{error}. Note that the times |
| 32 | returned by \function{stat()} are floating-point values, like all time |
Jack Jansen | 7aeba45 | 2003-02-12 09:58:33 +0000 | [diff] [blame] | 33 | values in MacPython-OS9. |
Fred Drake | fe7f3bc | 1998-07-23 17:55:31 +0000 | [diff] [blame] | 34 | |
Fred Drake | c817e27 | 1998-08-10 18:40:22 +0000 | [diff] [blame] | 35 | \section{\module{macpath} --- |
Fred Drake | 59d8b73 | 1999-02-01 20:19:38 +0000 | [diff] [blame] | 36 | MacOS path manipulation functions} |
Fred Drake | fe7f3bc | 1998-07-23 17:55:31 +0000 | [diff] [blame] | 37 | |
Fred Drake | f6863c1 | 1999-03-02 16:37:17 +0000 | [diff] [blame] | 38 | \declaremodule{standard}{macpath} |
| 39 | % Could be labeled \platform{Mac}, but the module should work anywhere and |
| 40 | % is distributed with the standard library. |
Fred Drake | fe7f3bc | 1998-07-23 17:55:31 +0000 | [diff] [blame] | 41 | \modulesynopsis{MacOS path manipulation functions.} |
| 42 | |
Fred Drake | 55fca54 | 1998-02-18 15:21:26 +0000 | [diff] [blame] | 43 | |
Fred Drake | 59d8b73 | 1999-02-01 20:19:38 +0000 | [diff] [blame] | 44 | This module is the Macintosh implementation of the \module{os.path} |
Fred Drake | cf282cd | 1999-04-28 14:04:36 +0000 | [diff] [blame] | 45 | module. It is most portably accessed as |
Fred Drake | e15eb35 | 1999-11-10 16:13:25 +0000 | [diff] [blame] | 46 | \module{os.path}\refstmodindex{os.path}. Refer to the |
| 47 | \citetitle[../lib/lib.html]{Python Library Reference} for |
| 48 | documentation of \module{os.path}. |
Guido van Rossum | 5fdeeea | 1994-01-02 01:22:07 +0000 | [diff] [blame] | 49 | |
| 50 | The following functions are available in this module: |
Fred Drake | 55fca54 | 1998-02-18 15:21:26 +0000 | [diff] [blame] | 51 | \function{normcase()}, |
| 52 | \function{normpath()}, |
| 53 | \function{isabs()}, |
| 54 | \function{join()}, |
| 55 | \function{split()}, |
| 56 | \function{isdir()}, |
| 57 | \function{isfile()}, |
| 58 | \function{walk()}, |
| 59 | \function{exists()}. |
Fred Drake | 59d8b73 | 1999-02-01 20:19:38 +0000 | [diff] [blame] | 60 | For other functions available in \module{os.path} dummy counterparts |
Guido van Rossum | 66774a9 | 1996-07-21 02:20:58 +0000 | [diff] [blame] | 61 | are available. |