Message288257
Using communicate fixed the problem. Here is the program that works for me on Mac OS 10.4.11 with Python 2.7.12:
import subprocess
import time
print("Launch started")
program_name = "top"
list = [program_name]
process = subprocess.Popen(list)
while process.poll() == None:
print("subprocess still running")
print("Value = " + process.communicate())
time.sleep(0.1)
print("Exit")
Thank you Ned. |
|
Date |
User |
Action |
Args |
2017-02-21 03:20:14 | pyguy | set | recipients:
+ pyguy, ronaldoussoren, ned.deily |
2017-02-21 03:20:14 | pyguy | set | messageid: <1487647214.72.0.523962286263.issue29609@psf.upfronthosting.co.za> |
2017-02-21 03:20:14 | pyguy | link | issue29609 messages |
2017-02-21 03:20:14 | pyguy | create | |
|