![]() ![]() This leads me to believe there is an issue using call when the script called runs processes in the background.Ĭan anyone shed any light on why this might occur. If I remove the run_task operation (and associated code with its operation in run_exp) from run_exp, the call command runs to completion as expected. When using call I see the output "run_exp finished!" but never "exp complete!". Running run_exp from command line I see expected behaviour and all processes finish completed.Īn issue arises when i call the run_exp command using python call. This is always completed by the time run_exp has finished. ![]() The run task command is another bash script. Run_exp is a bash script which runs a process in the background. I am calling a bash script from a python script. For example, if you want to run the command 'python myscript.py', you can define it as: Use the subprocess.Popen () function to start the process. I have an issue using subprocess.call when calling scripts which in turn run background processes. 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.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |