Subprocess.Popen ask

Ask a question:
  1. #!/usr/bin/env python
  2. import subprocess
  3. print 'popen2:'
  4. proc = subprocess.Popen(['cat','-'],stdin=subprocess.PIPE,stdout=subprocess.PIPE,)
  5. msg = 'through stdin to stdout'
  6. stdout_value = proc.communicate(msg)[0]
  7. print '\tpass through:',repr(stdout_value)
The code in the ['cat','-'], cannot read, trouble you to help explain, thank you

Started by Roderick at February 12, 2016 - 1:02 AM

The problem has been resolved.

Posted by Roderick at February 15, 2016 - 1:58 AM

I asked, after solving does not explain how to solve the contempt of;

Posted by Rex at February 17, 2016 - 2:25 AM

Well, I was wrong.

Do not know how to express, graph representation.

abc.png

Posted by Roderick at March 01, 2016 - 3:21 AM

I just know
  1. cat -
Is such use.. Thanks for

Posted by Yvonne at March 08, 2016 - 3:43 AM

Oh, LZ is quite good

Posted by Mick at March 13, 2016 - 4:12 AM

Thank you, the original Linux cat and this function. Long experience

Posted by Rex at March 20, 2016 - 4:32 AM