Author: bugman Date: Fri Aug 21 10:50:08 2009 New Revision: 9348 URL: http://svn.gna.org/viewcvs/relax?rev=9348&view=rev Log: The execfile statement has been replaced with a call to the exec(compile()) function. This was done with the python 2.x to 3.x script with the commands: 2to3 -w -f exec relax . The change is in preparation for Python 3.0, and relax still works with Python versions 2.4, 2.5, and 2.6. The syntax has changed from: execfile(script_file, local) to: exec(compile(open(script_file).read(), script_file, 'exec'), local) Hmmm, not much of a language simplification! Modified: 1.3/prompt/interpreter.py Modified: 1.3/prompt/interpreter.py URL: http://svn.gna.org/viewcvs/relax/1.3/prompt/interpreter.py?rev=9348&r1=9347&r2=9348&view=diff ============================================================================== --- 1.3/prompt/interpreter.py (original) +++ 1.3/prompt/interpreter.py Fri Aug 21 10:50:08 2009 @@ -430,7 +430,7 @@ # Execute the script. try: - execfile(script_file, local) + exec(compile(open(script_file).read(), script_file, 'exec'), local) # Catch ctrl-C. except KeyboardInterrupt: