[docs] 2.1. Invoking the Interpreter

Suzen, Mehmet suzen at acm.org
Sun Dec 26 11:53:09 CET 2010


Hi,

There is a bug or an ambiguity on

http://docs.python.org/tutorial/interpreter.html

It says "Note that there is a difference between 'python file' and
'python <file'. In the latter case, input requests from the
program,..."

Must read as follows;
 Execute statements from a file (inputs requested from stdin)
$ python file.py
 Execute statements from a file (inputs requested from file)
$ python file.py < input


While python <input does not work in my case using Python 2.6.5
(r265:79063, Apr 16 2010, 13:09:56)
[GCC 4.4.3] on linux2.


Best Wishes,
Mehmet Suzen









 Execute statements from a file (inputs requested from stdin)
$ python file.py
 Execute statements from a file (inputs requested from file)
$ python file.py < input


More information about the docs mailing list