I need to execute a Python script from an already started Python session, as if it were launched from the command line. I’m thinking of similar to doing source in bash or sh.
I need to execute a Python script from an already started Python session, as
Share
In Python 2, the builtin function
execfiledoes this.