I am trying to run the same program recursively but with a different argument. I am doing it like this:
os.execv(file_dir, ['python'] + [sys.argv[0]] + [str(last_line)])
quit()
This is a snippet of a function that i call from my main function.
I tried making sure that that file is executable by doing chmod u+x program.py
but that did not work. What can the issue be?