i want to have a script re-execute itself (a few instances of itself in child processes) with different arguments. the problem i am running into is that
does anyone know what needs to be done for this?
sys.argv[0]
is not always the first component of the command. if the script is not directly executable and must be run by executing the python3 engine itself with the file name of the script as the first argument, then something like subprocess.Popen([sysargv[0]]+newargs)
won't execute (another instance of) the python3 engine. i don't even know where the script can find out if it was executed this way and of so, where to find how it was executed (the real C-level argv[0][] value the first instance of the engine started with).does anyone know what needs to be done for this?
Tradition is peer pressure from dead people
What do you call someone who speaks three languages? Trilingual. Two languages? Bilingual. One language? American.
What do you call someone who speaks three languages? Trilingual. Two languages? Bilingual. One language? American.