r87523 - python/branches/py3k/Doc/tutorial/interpreter.rst

Author: georg.brandl Date: Tue Dec 28 10:18:24 2010 New Revision: 87523 Log: Remove confusing paragraph -- this is relevant only to advanced users anyway and does not belong into the tutorial. Modified: python/branches/py3k/Doc/tutorial/interpreter.rst Modified: python/branches/py3k/Doc/tutorial/interpreter.rst ============================================================================== --- python/branches/py3k/Doc/tutorial/interpreter.rst (original) +++ python/branches/py3k/Doc/tutorial/interpreter.rst Tue Dec 28 10:18:24 2010 @@ -58,14 +58,6 @@ ``python -m module [arg] ...``, which executes the source file for *module* as if you had spelled out its full name on the command line. -Note that there is a difference between ``python file`` and ``python -<file``. In the latter case, input requests from the program, such as calling -``sys.stdin.read()``, are satisfied from *file*. Since this file has already -been read until the end by the parser before the program starts executing, the -program will encounter end-of-file immediately. In the former case (which is -usually what you want) they are satisfied from whatever file or device is -connected to standard input of the Python interpreter. - When a script file is used, it is sometimes useful to be able to run the script and enter interactive mode afterwards. This can be done by passing :option:`-i` before the script. (This does not work if the script is read from standard

It might still be worth saying something like: Note that this "python <file" does something subtly different; the details are not included in this tutorial. On Tue, Dec 28, 2010 at 4:18 AM, georg.brandl <python-checkins@python.org> wrote:
Author: georg.brandl Date: Tue Dec 28 10:18:24 2010 New Revision: 87523
Log: Remove confusing paragraph -- this is relevant only to advanced users anyway and does not belong into the tutorial.
Modified: python/branches/py3k/Doc/tutorial/interpreter.rst
Modified: python/branches/py3k/Doc/tutorial/interpreter.rst ============================================================================== --- python/branches/py3k/Doc/tutorial/interpreter.rst (original) +++ python/branches/py3k/Doc/tutorial/interpreter.rst Tue Dec 28 10:18:24 2010 @@ -58,14 +58,6 @@ ``python -m module [arg] ...``, which executes the source file for *module* as if you had spelled out its full name on the command line.
-Note that there is a difference between ``python file`` and ``python -<file``. In the latter case, input requests from the program, such as calling -``sys.stdin.read()``, are satisfied from *file*. Since this file has already -been read until the end by the parser before the program starts executing, the -program will encounter end-of-file immediately. In the former case (which is -usually what you want) they are satisfied from whatever file or device is -connected to standard input of the Python interpreter. - When a script file is used, it is sometimes useful to be able to run the script and enter interactive mode afterwards. This can be done by passing :option:`-i` before the script. (This does not work if the script is read from standard _______________________________________________ Python-checkins mailing list Python-checkins@python.org http://mail.python.org/mailman/listinfo/python-checkins

On Wed, Dec 29, 2010 at 10:35 AM, Jim Jewett <jimjjewett@gmail.com> wrote:
It might still be worth saying something like:
Note that this "python <file" does something subtly different; the details are not included in this tutorial.
No, it this in fact puzzling. I was fine with the previous paragraph and if someone found it confusing, removing it is okay. But the above suggested sentence would leave the reader with an incomplete information. -- Senthil
participants (3)
-
georg.brandl
-
Jim Jewett
-
Senthil Kumaran