![]() ![]() ![]() 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? 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) This is the args parameter of the run () function. You imported subprocess and then called the run () function with a list of strings as the one and only argument. I need the prompt back in the "normal" lapse of time (as when I run the perl script manually). CompletedProcess (args 'python', 'timer.py', '5', returncode0) With this code, you should’ve seen the animation playing right in the REPL. 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 |