stdin tag

2 questions


1 answers
81 views
0
An error occurs when passing a string to subprocess.Poven using the stdin factor.

import subprocessfrom cStringIO import StringIOsubprocess.Popen(['grep','f'],stdout=subprocess.PIPE,stdin=StringIO('one\ntwo\nthree\nfour\nfive\nsix\n')).communicate()[0]Traceback (most recent call la...

1 years ago

1 answers
55 views
0
Is there a way to read from stdin in Python?

I need to get input only from stdin, how do I do it on Python?

1 years ago

© 2024 OneMinuteCode. All rights reserved.