On 12/13/2016 10:48 AM, Random832 wrote:
> The problem is there's currently no way to differentiate "interactive
> mode" from "script run on a tty".
> 
> You can get similar behavior with python -c "import
> sys;exec(sys.stdin.read())"
Are you sure? I can pipe scripts into Python and they run fine and
Python is not in interactive mode.

python < script.py

The behavior the OP is looking for of course is a way of demarcating the
end of the script and the beginning of data to feed the script.

-- 
https://mail.python.org/mailman/listinfo/python-list

Reply via email to