Input redirection with IDLE

C

candide

Hi

Does IDLE (the default GUI avalaible with the standard distribution)
support redirection from the standard input ? To be more precise, inside
a Windows or Linux shell I may redirect input data from a text file to
be executed by a python file. For instance suppose I have this python file


# foo.py
print int(raw_input())+int(raw_input())


and this data file

--------- data.txt BOF ------------
42
77
--------- data.txt EOF ------------

I may process the data in this way :

~$ python foo.py < data.txt

and the result is the following printing :

119


Is IDLE able to provide the same service ?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,011
Latest member
AjaUqq1950

Latest Threads

Top