diff options
Diffstat (limited to 'Doc/tutorial')
-rw-r--r-- | Doc/tutorial/appetite.rst | 2 | ||||
-rw-r--r-- | Doc/tutorial/inputoutput.rst | 18 | ||||
-rw-r--r-- | Doc/tutorial/interpreter.rst | 6 |
3 files changed, 13 insertions, 13 deletions
diff --git a/Doc/tutorial/appetite.rst b/Doc/tutorial/appetite.rst index b5e1a16..26e5168 100644 --- a/Doc/tutorial/appetite.rst +++ b/Doc/tutorial/appetite.rst @@ -23,7 +23,7 @@ You could write a Unix shell script or Windows batch files for some of these tasks, but shell scripts are best at moving around files and changing text data, not well-suited for GUI applications or games. You could write a C/C++/Java program, but it can take a lot of development time to get even a first-draft -program. Python is simpler to use, available on Windows, MacOS X, and Unix +program. Python is simpler to use, available on Windows, Mac OS X, and Unix operating systems, and will help you get the job done more quickly. Python is simple to use, but it is a real programming language, offering much diff --git a/Doc/tutorial/inputoutput.rst b/Doc/tutorial/inputoutput.rst index 559ce31..7287e3e 100644 --- a/Doc/tutorial/inputoutput.rst +++ b/Doc/tutorial/inputoutput.rst @@ -237,15 +237,15 @@ automatically added to the end. ``'r+'`` opens the file for both reading and writing. The *mode* argument is optional; ``'r'`` will be assumed if it's omitted. -On Windows and the Macintosh, ``'b'`` appended to the mode opens the file in -binary mode, so there are also modes like ``'rb'``, ``'wb'``, and ``'r+b'``. -Windows makes a distinction between text and binary files; the end-of-line -characters in text files are automatically altered slightly when data is read or -written. This behind-the-scenes modification to file data is fine for ASCII -text files, but it'll corrupt binary data like that in :file:`JPEG` or -:file:`EXE` files. Be very careful to use binary mode when reading and writing -such files. On Unix, it doesn't hurt to append a ``'b'`` to the mode, so -you can use it platform-independently for all binary files. +On Windows, ``'b'`` appended to the mode opens the file in binary mode, so there +are also modes like ``'rb'``, ``'wb'``, and ``'r+b'``. Windows makes a +distinction between text and binary files; the end-of-line characters in text +files are automatically altered slightly when data is read or written. This +behind-the-scenes modification to file data is fine for ASCII text files, but +it'll corrupt binary data like that in :file:`JPEG` or :file:`EXE` files. Be +very careful to use binary mode when reading and writing such files. On Unix, +it doesn't hurt to append a ``'b'`` to the mode, so you can use it +platform-independently for all binary files. .. _tut-filemethods: diff --git a/Doc/tutorial/interpreter.rst b/Doc/tutorial/interpreter.rst index c9ceaf6..0ac7ee1 100644 --- a/Doc/tutorial/interpreter.rst +++ b/Doc/tutorial/interpreter.rst @@ -157,9 +157,9 @@ shell scripts, by putting the line :: (assuming that the interpreter is on the user's :envvar:`PATH`) at the beginning of the script and giving the file an executable mode. The ``#!`` must be the first two characters of the file. On some platforms, this first line must end -with a Unix-style line ending (``'\n'``), not a Mac OS (``'\r'``) or Windows -(``'\r\n'``) line ending. Note that the hash, or pound, character, ``'#'``, is -used to start a comment in Python. +with a Unix-style line ending (``'\n'``), not a Windows (``'\r\n'``) line +ending. Note that the hash, or pound, character, ``'#'``, is used to start a +comment in Python. The script can be given an executable mode, or permission, using the :program:`chmod` command:: |