diff options
author | Georg Brandl <georg@python.org> | 2008-05-26 17:55:52 (GMT) |
---|---|---|
committer | Georg Brandl <georg@python.org> | 2008-05-26 17:55:52 (GMT) |
commit | f4a41231b2ddcd4bd6131e69c854249d8eb75899 (patch) | |
tree | 7aaf7a5a2f3d8de08495602fea4d20edcaa479fd /Doc/library/os.rst | |
parent | 95f5686e4d956edff0b3bb4aaae4fe12b81f6521 (diff) | |
download | cpython-f4a41231b2ddcd4bd6131e69c854249d8eb75899.zip cpython-f4a41231b2ddcd4bd6131e69c854249d8eb75899.tar.gz cpython-f4a41231b2ddcd4bd6131e69c854249d8eb75899.tar.bz2 |
Fix old-style octal literals in the docs.
Diffstat (limited to 'Doc/library/os.rst')
-rw-r--r-- | Doc/library/os.rst | 31 |
1 files changed, 16 insertions, 15 deletions
diff --git a/Doc/library/os.rst b/Doc/library/os.rst index 2badfd3..844f488 100644 --- a/Doc/library/os.rst +++ b/Doc/library/os.rst @@ -490,10 +490,10 @@ by file descriptors. .. function:: open(file, flags[, mode]) - Open the file *file* and set various flags according to *flags* and possibly its - mode according to *mode*. The default *mode* is ``0777`` (octal), and the - current umask value is first masked out. Return the file descriptor for the - newly opened file. Availability: Macintosh, Unix, Windows. + Open the file *file* and set various flags according to *flags* and possibly + its mode according to *mode*. The default *mode* is ``0o777`` (octal), and + the current umask value is first masked out. Return the file descriptor for + the newly opened file. Availability: Macintosh, Unix, Windows. For a description of the flag and mode values, see the C run-time documentation; flag constants (like :const:`O_RDONLY` and :const:`O_WRONLY`) are defined in @@ -823,9 +823,9 @@ Files and Directories .. function:: mkfifo(path[, mode]) - Create a FIFO (a named pipe) named *path* with numeric mode *mode*. The default - *mode* is ``0666`` (octal). The current umask value is first masked out from - the mode. Availability: Macintosh, Unix. + Create a FIFO (a named pipe) named *path* with numeric mode *mode*. The + default *mode* is ``0o666`` (octal). The current umask value is first masked + out from the mode. Availability: Macintosh, Unix. FIFOs are pipes that can be accessed like regular files. FIFOs exist until they are deleted (for example with :func:`os.unlink`). Generally, FIFOs are used as @@ -834,7 +834,7 @@ Files and Directories doesn't open the FIFO --- it just creates the rendezvous point. -.. function:: mknod(filename[, mode=0600, device]) +.. function:: mknod(filename[, mode=0o600, device]) Create a filesystem node (file, device special file or named pipe) named *filename*. *mode* specifies both the permissions to use and the type of node to @@ -865,9 +865,10 @@ Files and Directories .. function:: mkdir(path[, mode]) - Create a directory named *path* with numeric mode *mode*. The default *mode* is - ``0777`` (octal). On some systems, *mode* is ignored. Where it is used, the - current umask value is first masked out. Availability: Macintosh, Unix, Windows. + Create a directory named *path* with numeric mode *mode*. The default *mode* + is ``0o777`` (octal). On some systems, *mode* is ignored. Where it is used, + the current umask value is first masked out. Availability: Macintosh, Unix, + Windows. It is also possible to create temporary directories; see the :mod:`tempfile` module's :func:`tempfile.mkdtemp` function. @@ -880,10 +881,10 @@ Files and Directories single: UNC paths; and os.makedirs() Recursive directory creation function. Like :func:`mkdir`, but makes all - intermediate-level directories needed to contain the leaf directory. Throws an - :exc:`error` exception if the leaf directory already exists or cannot be - created. The default *mode* is ``0777`` (octal). On some systems, *mode* is - ignored. Where it is used, the current umask value is first masked out. + intermediate-level directories needed to contain the leaf directory. Throws + an :exc:`error` exception if the leaf directory already exists or cannot be + created. The default *mode* is ``0o777`` (octal). On some systems, *mode* + is ignored. Where it is used, the current umask value is first masked out. .. note:: |