Author: tlinnet Date: Fri Feb 14 10:32:15 2014 New Revision: 22181 URL: http://svn.gna.org/viewcvs/relax?rev=22181&view=rev Log: Shifted the pedantic flag to escalate flag. The option -p would insted be used for the option --prompt.
Fix for sr #3117, (https://gna.org/support/?3117) - Functionality to inspect interactively after running script - The equivalence to python -i Modified: trunk/lib/errors.py trunk/lib/warnings.py trunk/relax.py trunk/status.py Modified: trunk/lib/errors.py URL: http://svn.gna.org/viewcvs/relax/trunk/lib/errors.py?rev=22181&r1=22180&r2=22181&view=diff ============================================================================== --- trunk/lib/errors.py (original) +++ trunk/lib/errors.py Fri Feb 14 10:32:15 2014 @@ -131,9 +131,9 @@ def __str__(self): """Modify the behaviour of the error system.""" - # Save the state if the pedantic flag is turned on. + # Save the state if the escalate flag is turned on. from status import Status; status = Status() - if status.pedantic: + if status.escalate: save_state() # Modify the error message to include 'RelaxError' at the start (using coloured text if a TTY). Modified: trunk/lib/warnings.py URL: http://svn.gna.org/viewcvs/relax/trunk/lib/warnings.py?rev=22181&r1=22180&r2=22181&view=diff ============================================================================== --- trunk/lib/warnings.py (original) +++ trunk/lib/warnings.py Fri Feb 14 10:32:15 2014 @@ -39,8 +39,8 @@ # Add the text 'RelaxWarning: ' to the start of the warning message. message = "RelaxWarning: %s\n" % message - # Print stack-trace in pedantic mode. - if status.pedantic: + # Print stack-trace in escalate mode. + if status.escalate: tb = "" for frame in inspect.stack()[4:]: file = frame[1] @@ -77,7 +77,7 @@ warnings.formatwarning = format # Set warning filters. - if status.pedantic: + if status.escalate: warnings.filterwarnings('error', category=BaseWarning) else: warnings.filterwarnings('always', category=BaseWarning) Modified: trunk/relax.py URL: http://svn.gna.org/viewcvs/relax/trunk/relax.py?rev=22181&r1=22180&r2=22181&view=diff ============================================================================== --- trunk/relax.py (original) +++ trunk/relax.py Fri Feb 14 10:32:15 2014 @@ -279,7 +279,7 @@ parser.add_option('--licence', action='store_true', dest='licence', default=0, help='display the licence') 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('-p', '--pedantic', action='store_true', dest='pedantic', default=0, help='escalate all warnings to errors') + parser.add_option('-e', '--escalate', action='store_true', dest='escalate', default=0, help='escalate all warnings to errors') 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)') @@ -301,9 +301,9 @@ if options.numpy_raise: numpy.seterr(all='raise') - # Pedantic flag. - if options.pedantic: - status.pedantic = True + # escalate flag. + if options.escalate: + status.escalate = True # Logging. if options.log: Modified: trunk/status.py URL: http://svn.gna.org/viewcvs/relax/trunk/status.py?rev=22181&r1=22180&r2=22181&view=diff ============================================================================== --- trunk/status.py (original) +++ trunk/status.py Fri Feb 14 10:32:15 2014 @@ -51,7 +51,7 @@ # Initialise some variables. self._instance.debug = False - self._instance.pedantic = False + self._instance.escalate = False self._instance.test_mode = False self._instance.uf_intro = False self._instance.show_gui = False _______________________________________________ relax (http://www.nmr-relax.com) This is the relax-commits mailing list relax-commits@gna.org 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