I've written a script that generates a phylogentic tree with the ete3 package, the script runs on a headless server thus it must be launched with xvfb-run (per here).
I've setup the script to check (through a system call to ps
) if it was called with xvfb. In the case where the python script is launched without xvfb-run (e.g. python script.py...
), is there a straightforward way for me to kill the process and re-run it correctly (e.g. xvfb-run python script.py...
) from within the original script call?
I've tried hacking something together with os.system()
calls to ps
, but I'm not having much luck. Does anyone have any suggestions?