Author: bugman Date: Fri May 2 11:02:35 2014 New Revision: 22912 URL: http://svn.gna.org/viewcvs/relax?rev=22912&view=rev Log: Fix for bug #22001, the execution of script changing the current working directory. This is reported at http://gna.org/bugs/?22001. The changing of the current working directory (CWD) was added to allow for nested scripting. However this is no longer needed as the script import mechanism has changed from the exec() function call to the runpy Python module. Modified: trunk/prompt/interpreter.py Modified: trunk/prompt/interpreter.py URL: http://svn.gna.org/viewcvs/relax/trunk/prompt/interpreter.py?rev=22912&r1=22911&r2=22912&view=diff ============================================================================== --- trunk/prompt/interpreter.py (original) +++ trunk/prompt/interpreter.py Fri May 2 11:02:35 2014 @@ -328,11 +328,6 @@ script_path = path.join(getcwd(), head) sys.path.append(script_path) - # Switch directories for nested scripting. - if head: - orig_dir = getcwd() - chdir(head) - # The module name. module, ext = path.splitext(tail) @@ -356,10 +351,6 @@ exec(compile(open(name).read(), name, 'exec'), globals) finally: - # Switch back to the original working directory. - if head: - chdir(orig_dir) - # Remove the script path. sys.path.reverse() sys.path.pop(sys.path.index(script_path))