[Python-3000-checkins] r63708 - in python/branches/py3k/Doc: distutils/apiref.rst library/cgi.rst library/dbm.rst library/os.rst library/uu.rst

georg.brandl python-3000-checkins at python.org
Mon May 26 19:55:53 CEST 2008


Author: georg.brandl
Date: Mon May 26 19:55:52 2008
New Revision: 63708

Log:
Fix old-style octal literals in the docs.


Modified:
   python/branches/py3k/Doc/distutils/apiref.rst
   python/branches/py3k/Doc/library/cgi.rst
   python/branches/py3k/Doc/library/dbm.rst
   python/branches/py3k/Doc/library/os.rst
   python/branches/py3k/Doc/library/uu.rst

Modified: python/branches/py3k/Doc/distutils/apiref.rst
==============================================================================
--- python/branches/py3k/Doc/distutils/apiref.rst	(original)
+++ python/branches/py3k/Doc/distutils/apiref.rst	Mon May 26 19:55:52 2008
@@ -961,7 +961,7 @@
 directories.
 
 
-.. function:: mkpath(name[, mode=0777, verbose=0, dry_run=0])
+.. function:: mkpath(name[, mode=0o777, verbose=0, dry_run=0])
 
    Create a directory and any missing ancestor directories.  If the directory
    already exists (or if *name* is the empty string, which means the current
@@ -972,7 +972,7 @@
    directories actually created.
 
 
-.. function:: create_tree(base_dir, files[, mode=0777, verbose=0, dry_run=0])
+.. function:: create_tree(base_dir, files[, mode=0o777, verbose=0, dry_run=0])
 
    Create all the empty directories under *base_dir* needed to put *files* there.
    *base_dir* is just the a name of a directory which doesn't necessarily exist

Modified: python/branches/py3k/Doc/library/cgi.rst
==============================================================================
--- python/branches/py3k/Doc/library/cgi.rst	(original)
+++ python/branches/py3k/Doc/library/cgi.rst	Mon May 26 19:55:52 2008
@@ -385,7 +385,7 @@
 usually this is in a directory :file:`cgi-bin` in the server tree.
 
 Make sure that your script is readable and executable by "others"; the Unix file
-mode should be ``0755`` octal (use ``chmod 0755 filename``).  Make sure that the
+mode should be ``0o755`` octal (use ``chmod 0755 filename``).  Make sure that the
 first line of the script contains ``#!`` starting in column 1 followed by the
 pathname of the Python interpreter, for instance::
 
@@ -394,8 +394,8 @@
 Make sure the Python interpreter exists and is executable by "others".
 
 Make sure that any files your script needs to read or write are readable or
-writable, respectively, by "others" --- their mode should be ``0644`` for
-readable and ``0666`` for writable.  This is because, for security reasons, the
+writable, respectively, by "others" --- their mode should be ``0o644`` for
+readable and ``0o666`` for writable.  This is because, for security reasons, the
 HTTP server executes your script as user "nobody", without any special
 privileges.  It can only read (write, execute) files that everybody can read
 (write, execute).  The current directory at execution time is also different (it

Modified: python/branches/py3k/Doc/library/dbm.rst
==============================================================================
--- python/branches/py3k/Doc/library/dbm.rst	(original)
+++ python/branches/py3k/Doc/library/dbm.rst	Mon May 26 19:55:52 2008
@@ -242,7 +242,7 @@
    :exc:`error` is raised if an invalid flag is specified.
 
    The optional *mode* argument is the Unix mode of the file, used only when the
-   database has to be created.  It defaults to octal ``0666``.
+   database has to be created.  It defaults to octal ``0o666``.
 
    In addition to the dictionary-like methods, ``gdbm`` objects have the
    following methods:
@@ -334,7 +334,7 @@
    +---------+-------------------------------------------+
 
    The optional *mode* argument is the Unix mode of the file, used only when the
-   database has to be created.  It defaults to octal ``0666`` (and will be
+   database has to be created.  It defaults to octal ``0o666`` (and will be
    modified by the prevailing umask).
 
 

Modified: python/branches/py3k/Doc/library/os.rst
==============================================================================
--- python/branches/py3k/Doc/library/os.rst	(original)
+++ python/branches/py3k/Doc/library/os.rst	Mon May 26 19:55:52 2008
@@ -490,10 +490,10 @@
 
 .. 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 @@
 
 .. 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 @@
    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 @@
 
 .. 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 @@
       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::
 

Modified: python/branches/py3k/Doc/library/uu.rst
==============================================================================
--- python/branches/py3k/Doc/library/uu.rst	(original)
+++ python/branches/py3k/Doc/library/uu.rst	Mon May 26 19:55:52 2008
@@ -27,10 +27,10 @@
 
 .. function:: encode(in_file, out_file[, name[, mode]])
 
-   Uuencode file *in_file* into file *out_file*.  The uuencoded file will have the
-   header specifying *name* and *mode* as the defaults for the results of decoding
-   the file. The default defaults are taken from *in_file*, or ``'-'`` and ``0666``
-   respectively.
+   Uuencode file *in_file* into file *out_file*.  The uuencoded file will have
+   the header specifying *name* and *mode* as the defaults for the results of
+   decoding the file. The default defaults are taken from *in_file*, or ``'-'``
+   and ``0o666`` respectively.
 
 
 .. function:: decode(in_file[, out_file[, mode[, quiet]]])


More information about the Python-3000-checkins mailing list