I'm looking for a way to get the same behavior from the perl script (returning prompt in a matter of seconds) when I run it from python. Long story.ĭoes anyone have any though or workaround to deal with this problem? To start a background process in Python using the subprocess module, you can follow these steps: Define the command to be executed as a list of strings. ![]() ![]() I have neither control nor details about the programming code of this perl script. Proc = subprocess.Popen(cmd, shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE, universal_newlines=True) I need the prompt back in the "normal" lapse of time (as when I run the perl script manually). import os import sys import subprocess sub subprocess.Popen ( blender, /home/pegasi/green.blend, -python, /home/pegasi/changematerialname. I made a python script which runs the perl script, using subprocess pope, but under this scenario, the prompt is returned until the entire perl script has finished (which I need to avoid). ![]() I have a perl script which once executed, returns the prompt in a matter of few seconds, but script still works in background for several minutes (sometimes more than an hour).
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |