Author: tlinnet
Date: Fri Feb 14 11:47:33 2014
New Revision: 22185
URL: http://svn.gna.org/viewcvs/relax?rev=22185&view=rev
Log:
Manually reverted the temporary change of r22184 and 22183.
The command used was:
svn merge -r22184:r22182 .
.....
r22184 | tlinnet | 2014-02-14 11:22:57 +0100 (Fri, 14 Feb 2014) | 6 lines
Modified the help text to explain that -p will launch relax in prompt mode
after running any optionally supplied scripts.
Fix for sr #3117, (https://gna.org/support/?3117) - Functionality to
inspect interactively after running script - The equivalence to python -i
This is to allow the -p --prompt option to be given without a script. relax
should support this so that a user doesn't get too confused when
trying to start in prompt mode with the --prompt flag and support the
--prompt argument without a script being supplied.
------------------------------------------------------------------------
r22183 | tlinnet | 2014-02-14 11:22:56 +0100 (Fri, 14 Feb 2014) | 1 line
Second
.....
Modified:
trunk/prompt/interpreter.py
trunk/relax.py
Modified: trunk/prompt/interpreter.py
URL:
http://svn.gna.org/viewcvs/relax/trunk/prompt/interpreter.py?rev=22185&r1=22184&r2=22185&view=diff
==============================================================================
--- trunk/prompt/interpreter.py (original)
+++ trunk/prompt/interpreter.py Fri Feb 14 11:47:33 2014
@@ -266,16 +266,12 @@
readline.parse_and_bind("tab: complete")
# Execute the script file if given.
- if script_file and not status.prompt:
+ if script_file:
# 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:
@@ -336,18 +332,13 @@
# Reverse the system path so that the script path is first.
sys.path.reverse()
- # Execute the script as a module if the inspect interactively
prompt flag is not true.
- if dep_check.runpy_module and not status.prompt:
+ # Execute the script as a module.
+ if dep_check.runpy_module:
runpy.run_module(module, globals)
- # Execute the script as a module if the inspect interactively
prompt flag is not true.
- elif dep_check.runpy_module and not status.prompt:
- runpy.run_module(module, globals)
-
# Allow scripts to run under Python <= 2.4.
else:
exec(compile(open(name).read(), name, 'exec'), globals)
-
finally:
# Switch back to the original working directory.
Modified: trunk/relax.py
URL:
http://svn.gna.org/viewcvs/relax/trunk/relax.py?rev=22185&r1=22184&r2=22185&view=diff
==============================================================================
--- trunk/relax.py (original)
+++ trunk/relax.py Fri Feb 14 11:47:33 2014
@@ -215,7 +215,7 @@
# Only import the module in the test modes (to improve program
start up speeds).
from test_suite.test_suite_runner import Test_suite_runner
- # Load the interpreter and turn intros on.launch relax in
prompt mode after running any optionally supplied scripts
+ # Load the interpreter and turn intros on.
self.interpreter = interpreter.Interpreter(show_script=False,
raise_relax_error=True)
self.interpreter.on()
@@ -280,7 +280,7 @@
parser.add_option('-t', '--tee', action='store', type='string',
dest='tee', help='tee relax output to stdout and the file LOG_FILE',
metavar='LOG_FILE')
parser.add_option('-g', '--gui', action='store_true', dest='gui',
default=0, help='launch the relax GUI')
parser.add_option('-e', '--escalate', action='store_true',
dest='escalate', default=0, help='escalate all warnings to errors')
- parser.add_option('-p', '--prompt', action='store_true',
dest='prompt', default=0, help='launch relax in prompt mode after running
any optionally supplied scripts')
+ parser.add_option('-p', '--prompt', action='store_true',
dest='prompt', default=0, help='execute the given script and continue into
the prompt mode to allow for interactive inspection')
parser.add_option('--test', action='store_true', dest='test',
default=0, help='run relax in test mode')
parser.add_option('-x', '--test-suite', action='store_true',
dest='test_suite', default=0, help='execute the relax test suite')
parser.add_option('-s', '--system-tests', action='store_true',
dest='system_tests', default=0, help='execute the relax system/functional
tests (part of the test suite)')
_______________________________________________
relax (http://www.nmr-relax.com)
This is the relax-commits mailing list
relax-commits@xxxxxxx
To unsubscribe from this list, get a password
reminder, or change your subscription options,
visit the list information page at
https://mail.gna.org/listinfo/relax-commits