stdin tag

2 questions


1 answers
90 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...

2 years ago

1 answers
61 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?

2 years ago

© 2024 OneMinuteCode. All rights reserved.