What's wrong on using Popen's communicate method?

jfong at ms4.hinet.net jfong at ms4.hinet.net
Wed Jul 3 19:57:40 EDT 2019


I have the test0.py below. I expect to see 'abcd' showing in the notepad window:
---------
import subprocess as sp
p0 = sp.Popen('notepad.exe', stdin=sp.PIPE)
p0.communicate(input=b'abcd')
---------
But nothing happens. The notepad is completely empty. What have I missed?

--Jach

PS. I am using python 3.4 on Windows Vista



More information about the Python-list mailing list