3 Solved Topics

Remove Filter
Member Avatar for
Member Avatar for krystosan

i am trying to recieve input from external text editor using python's `subprocess` but I am not sure why i am getting the error diff = subprocess.Popen('open(os.path.join(os.getcwd(), "foo.txt") "w")', stdout=subprocess.PIPE) pr = subprocess.Popen(sublime, stdout=subprocess.PIPE, stderr=subprocess.PIPE, shell=True, stdin=diff.stdout) pr.wait() if pr.returncode == 0: msg = pr.stdout.read() print msg er = pr.stderr.read() …

Member Avatar for krystosan
0
375
Member Avatar for krystosan

Is there any way to start an application with python and count how much time does it take to completely load, any idea if I can do it with os.syste, or subprocess.Popen ?

Member Avatar for germ
0
272
Member Avatar for _neo_

Hi. I want to run some shell commands on linux machine with python Popen, for ex. "ping". How I can terminate the process, if it isn't finished normally in a given time? I've tried write some code, can anybody improve it or give some better idea? Any suggestions appreciated. Thanx. …

Member Avatar for Gribouillis
0
1K

The End.