You need to sign in or sign up before continuing.
Because we use execfile to emulate "python script.py" invocation, future enabled in gpython main script are also enabled in "script.py" and because we use print_function feature, it was also applied in "script.py". On python 2 when "script.py" uses print statements they were considered as SyntaxError.
Hopefuly, compile has a dont_inherit flag which does exactly what we need
here: compile the script without inheriting futures enabled, so we use
compile with this flag.