[Tutor] New guy question...

Rich Lovely roadierich at googlemail.com
Tue Sep 15 22:28:20 CEST 2009


2009/9/15 Warren <warren at wantonhubris.com>:
>>
>> Does TextMate support input into a running Python program? I'm not
>> sure if it supports standard input. You might have to run the program
>> from Terminal to get this to work.
>
>
> Good question, Kent.  That might be the root of all of this pain.  I'll
> experiment when I get a chance...
>
> - Warren
> (warren at wantonhubris.com)
>
>
>
>
> _______________________________________________
> Tutor maillist  -  Tutor at python.org
> To unsubscribe or change subscription options:
> http://mail.python.org/mailman/listinfo/tutor
>

As I mentioned in my earlier response, the only way I could replicate
the error was to pipe the file into python, disconnecting (I'm
guessing) the stdin stream from the terminal:

$ cat test.py
input()
$ cat test.py | python3
Traceback (most recent call last):
 File "<stdin>", line 1, in <module>
EOFError: EOF when reading a line

(I also tested the script in the OP, and got identical output to that
mentioned).
This supports Kent's suggestion in a way, although maybe for a
slightly different reason.

-- 
Rich "Roadie Rich" Lovely

There are 10 types of people in the world: those who know binary,
those who do not, and those who are off by one.


More information about the Tutor mailing list