[BangPypers] how to override sys.stdin
rohitchormale at gmail.com
Mon Aug 4 12:26:30 CEST 2014
It might work,
sys.stdin = open(sys.stdin.fileno(), 'r', <Data descriptors>)
Simply for replacing iostream,
sys.stdin = open(<filepath> ,'r')
On Mon, Aug 4, 2014 at 3:48 PM, Rohit Chormale <rohitchormale at gmail.com>
> Hi Nitin,
> Do u mean redirecting Standard IO streams?
> On Mon, Aug 4, 2014 at 3:08 PM, Noufal Ibrahim KV <noufal at nibrahim.net.in>
>> On Mon, Aug 04 2014, Nitin Kumar wrote:
>> > thats a typo error.
>> > in simple term my question would be: How to override sys.stdin.
>> The StringIO module gives you file like objects into which you can put
>> data. They might work as substitues for sys.std*
>> BangPypers mailing list
>> BangPypers at python.org
More information about the BangPypers