I'm modifying someone else's Python code, and it currently synchronously executes an external Python script (fast-downward
) using the system's default Python (and gets the return code):
code = os.system("%s/src/translate/translate.py %s %s" % (down_home, domain, pddl) # ...
I don't want to make /usr/local/bin/python2.7
my default Python interpreter (CentOS ships with an older Python). How can I invoke an external Python script using the current Python interpreter?
I don't want to fork. I'll try the suggestion, but I need the return code.