Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > Input redirection with IDLE

Thread Tools

Input redirection with IDLE

Posts: n/a

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

print int(raw_input())+int(raw_input())

and this data file

--------- data.txt BOF ------------
--------- data.txt EOF ------------

I may process the data in this way :

~$ python < data.txt

and the result is the following printing :


Is IDLE able to provide the same service ?

Reply With Quote

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
idle mac os x international keyboard umlaut input Some Friend Python 2 01-09-2012 05:58 AM
Input redirection in ruby Michal Suchanek Ruby 4 08-01-2008 06:47 AM
fork/exec with input redirection Dan Upton Python 3 11-27-2007 08:45 PM
Which is faster in ASIC: 2-input AND gate or a 2-input multiplexer Weng Tianxiang VHDL 12 08-11-2005 10:50 AM
input redirection MadHatter Perl 6 10-16-2003 04:05 PM