1998-08-10 18:40:22 +00:00
|
|
|
\section{\module{mac} ---
|
1999-02-01 20:19:38 +00:00
|
|
|
Implementations for the \module{os} module}
|
1998-02-19 19:45:19 +00:00
|
|
|
|
1999-03-02 16:37:17 +00:00
|
|
|
\declaremodule{builtin}{mac}
|
|
|
|
\platform{Mac}
|
1999-02-01 20:19:38 +00:00
|
|
|
\modulesynopsis{Implementations for the \module{os} module.}
|
1998-02-19 19:45:19 +00:00
|
|
|
|
1996-07-21 02:20:58 +00:00
|
|
|
|
1999-02-01 20:19:38 +00:00
|
|
|
This module implements the operating system dependent functionality
|
|
|
|
provided by the standard module \module{os}\refstmodindex{os}. It is
|
|
|
|
best accessed through the \module{os} module.
|
1994-01-02 01:22:07 +00:00
|
|
|
|
|
|
|
The following functions are available in this module:
|
1998-02-18 15:21:26 +00:00
|
|
|
\function{chdir()},
|
|
|
|
\function{close()},
|
|
|
|
\function{dup()},
|
|
|
|
\function{fdopen()},
|
|
|
|
\function{getcwd()},
|
|
|
|
\function{lseek()},
|
|
|
|
\function{listdir()},
|
|
|
|
\function{mkdir()},
|
|
|
|
\function{open()},
|
|
|
|
\function{read()},
|
|
|
|
\function{rename()},
|
|
|
|
\function{rmdir()},
|
|
|
|
\function{stat()},
|
|
|
|
\function{sync()},
|
|
|
|
\function{unlink()},
|
|
|
|
\function{write()},
|
|
|
|
as well as the exception \exception{error}. Note that the times
|
|
|
|
returned by \function{stat()} are floating-point values, like all time
|
|
|
|
values in MacPython.
|
1996-10-15 14:37:31 +00:00
|
|
|
|
2002-02-15 14:35:09 +00:00
|
|
|
One additional function is available, but only under Classic MacPython,
|
|
|
|
not under Carbon MacPython:
|
1999-02-01 20:19:38 +00:00
|
|
|
|
|
|
|
\begin{funcdesc}{xstat}{path}
|
|
|
|
This function returns the same information as \function{stat()}, but
|
|
|
|
with three additional values appended: the size of the resource fork
|
|
|
|
of the file and its 4-character creator and type.
|
2002-02-15 14:35:09 +00:00
|
|
|
Availability: Classic MacPython only.
|
|
|
|
\deprecated{2.3}{Use the \function{\refmodule{macfs}.FSSpec()}
|
|
|
|
function to get an FSSpec object for the file, then
|
|
|
|
use the \method{GetCreatorType()} method to get the
|
|
|
|
creator and type information. It will no longer be
|
|
|
|
possible to get the size of the resource fork.}
|
1999-02-01 20:19:38 +00:00
|
|
|
\end{funcdesc}
|
1994-01-02 01:22:07 +00:00
|
|
|
|
1998-07-23 17:55:31 +00:00
|
|
|
|
1998-08-10 18:40:22 +00:00
|
|
|
\section{\module{macpath} ---
|
1999-02-01 20:19:38 +00:00
|
|
|
MacOS path manipulation functions}
|
1998-07-23 17:55:31 +00:00
|
|
|
|
1999-03-02 16:37:17 +00:00
|
|
|
\declaremodule{standard}{macpath}
|
|
|
|
% Could be labeled \platform{Mac}, but the module should work anywhere and
|
|
|
|
% is distributed with the standard library.
|
1998-07-23 17:55:31 +00:00
|
|
|
\modulesynopsis{MacOS path manipulation functions.}
|
|
|
|
|
1998-02-18 15:21:26 +00:00
|
|
|
|
1999-02-01 20:19:38 +00:00
|
|
|
This module is the Macintosh implementation of the \module{os.path}
|
1999-04-28 14:04:36 +00:00
|
|
|
module. It is most portably accessed as
|
1999-11-10 16:13:25 +00:00
|
|
|
\module{os.path}\refstmodindex{os.path}. Refer to the
|
|
|
|
\citetitle[../lib/lib.html]{Python Library Reference} for
|
|
|
|
documentation of \module{os.path}.
|
1994-01-02 01:22:07 +00:00
|
|
|
|
|
|
|
The following functions are available in this module:
|
1998-02-18 15:21:26 +00:00
|
|
|
\function{normcase()},
|
|
|
|
\function{normpath()},
|
|
|
|
\function{isabs()},
|
|
|
|
\function{join()},
|
|
|
|
\function{split()},
|
|
|
|
\function{isdir()},
|
|
|
|
\function{isfile()},
|
|
|
|
\function{walk()},
|
|
|
|
\function{exists()}.
|
1999-02-01 20:19:38 +00:00
|
|
|
For other functions available in \module{os.path} dummy counterparts
|
1996-07-21 02:20:58 +00:00
|
|
|
are available.
|