خرید بک لینک

Vote count: 0

If I run the following python code (in python 2.7) I get an empty output file while I would expect a line. What is wrong?

import subprocess

with open('outfile.out', 'w') as out:
   pp=subprocess.Popen(['/bin/cat'],stdin=subprocess.PIPE,stdout=out)
   pp.stdin.write('Line I want into out filen')
   pp.terminate()

asked 1 min ago

برچسب: نویسنده: استخدام کار تاريخ: سه شنبه 8 تير 1395 ساعت: 20:16

صفحه بندی