mailr22183 - /trunk/prompt/interpreter.py


Others Months | Index by Date | Thread Index
>>   [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Header


Content

Posted by tlinnet on February 14, 2014 - 11:22:
Author: tlinnet
Date: Fri Feb 14 11:22:56 2014
New Revision: 22183

URL: http://svn.gna.org/viewcvs/relax?rev=22183&view=rev
Log:
Second

Modified:
    trunk/prompt/interpreter.py

Modified: trunk/prompt/interpreter.py
URL: 
http://svn.gna.org/viewcvs/relax/trunk/prompt/interpreter.py?rev=22183&r1=22182&r2=22183&view=diff
==============================================================================
--- trunk/prompt/interpreter.py (original)
+++ trunk/prompt/interpreter.py Fri Feb 14 11:22:56 2014
@@ -266,12 +266,16 @@
             readline.parse_and_bind("tab: complete")
 
         # Execute the script file if given.
-        if script_file:
+        if script_file and not status.prompt:
             # Turn on the user function intro flag.
             status.uf_intro = True
 
             # Run the script.
             return run_script(intro=self.__intro_string, local=locals(), 
script_file=script_file, show_script=self.__show_script, 
raise_relax_error=self.__raise_relax_error)
+
+        if script_file and status.prompt:
+            run_script(intro=self.__intro_string, local=locals(), 
script_file=script_file, show_script=self.__show_script, 
raise_relax_error=self.__raise_relax_error)
+            prompt(intro=None, local=locals())
 
         # Go to the prompt.
         else:
@@ -333,12 +337,13 @@
         sys.path.reverse()
 
         # Execute the script as a module.
-        if dep_check.runpy_module:
-            runpy.run_module(module, globals)
+        #if dep_check.runpy_module:
+        #    runpy.run_module(module, globals)
 
         # Allow scripts to run under Python <= 2.4.
-        else:
-            exec(compile(open(name).read(), name, 'exec'), globals)
+        #else:
+        #    exec(compile(open(name).read(), name, 'exec'), globals)
+        exec(compile(open(name).read(), name, 'exec'), globals)
 
     finally:
         # Switch back to the original working directory.




Related Messages


Powered by MHonArc, Updated Fri Feb 14 11:40:03 2014