Note that that 'quit' argument for the interpreter is ancient and
non-functional!  I'll look at finally eliminating it from relax.

Regards,

Edward



On 13 February 2014 17:08, Edward d'Auvergne <[email protected]> wrote:
> Hi Troels,
>
> The key is in the last if-else statement.  This logic executes the
> run_script() function returns the result if a script file is provided.
>  And if not, the prompt() function is executed.  This is the problem,
> for your aim you need both executed!  I hope this helps.
>
> Regards,
>
> Edward
>
>
>
> On 13 February 2014 16:59, Troels Emtekær Linnet <[email protected]> 
> wrote:
>> Hi Edward.
>>
>> In interpreter.py I have a problem.
>>
>> -----------------
>>     # Quit relax.
>>     # FIXME: need to drop off end of interpreter loop to exit cleanly
>>     #if quit:
>>     #    sys.exit()
>> -------------
>>
>> I have tried tried to set the Quit flag to False, but it seems it is not in
>> use?
>>
>> So I can't find what causes relax to quit after running the script.
>>
>> Best
>> Troels
>>
>>
>>
>> 2014-02-13 12:59 GMT+01:00 Edward d'Auvergne <[email protected]>:
>>
>>> Hi Troels,
>>>
>>> Such functionality would be great!  The option '-i' is already used
>>> though for the system information printout.  Do you have an
>>> alternative suggestion?  Maybe:
>>>
>>> -c, --continue    Execute the given script and continue into the
>>> prompt mode to allow for interactive inspection.
>>> -p, --prompt      Execute the given script and continue into the
>>> prompt mode to allow for interactive inspection (this will require
>>> changing the -p, --pedantic flag, which is not an issue).
>>>
>>> I like the second as it is more logical.  What would your suggestions be?
>>>
>>> As for an implementation, this should not be too hard.  Actually, it
>>> should be rather trivial by just launching into the prompt mode with
>>> the script as an argument, and then running the script inside the
>>> prompt.interpreter.Interpreter.run() method.  Look at that method and
>>> you'll see that implementing this feature should be a patch of less
>>> than 10 lines!  Just that file and the base 'relax.py' file for adding
>>> a new option and passing the script name in should be sufficient.
>>>
>>> Regards,
>>>
>>> Edward
>>>
>>> On 13 February 2014 12:47, Troels E. Linnet
>>> <[email protected]> wrote:
>>> > URL:
>>> >   <http://gna.org/support/?3117>
>>> >
>>> >                  Summary: Functionality to inspect interactively after
>>> > running
>>> > script - The equivalence to python -i
>>> >                  Project: relax
>>> >             Submitted by: tlinnet
>>> >             Submitted on: Thu 13 Feb 2014 11:47:57 AM UTC
>>> >                 Category: None
>>> >                 Priority: 5 - Normal
>>> >                 Severity: 1 - Wish
>>> >                   Status: Need Info
>>> >              Assigned to: None
>>> >         Originator Email:
>>> >              Open/Closed: Open
>>> >          Discussion Lock: Any
>>> >         Operating System: None
>>> >
>>> >     _______________________________________________________
>>> >
>>> > Details:
>>> >
>>> > I would be of interest ti have an option: relax -i script.py
>>> >
>>> > It should be the equivalence to the functionality: python -i script.py
>>> >
>>> > At the moment, such a possibility is reached by:
>>> > relax
>>> > script("script.py")
>>> >
>>> > But here one can only access the relax data containers.
>>> > Any defined variables in the script is not reached.
>>> >
>>> >
>>> >
>>> >
>>> >
>>> >
>>> >
>>> >
>>> >     _______________________________________________________
>>> >
>>> > Reply to this item at:
>>> >
>>> >   <http://gna.org/support/?3117>
>>> >
>>> > _______________________________________________
>>> >   Message sent via/by Gna!
>>> >   http://gna.org/
>>> >
>>> >
>>> > _______________________________________________
>>> > relax (http://www.nmr-relax.com)
>>> >
>>> > This is the relax-devel mailing list
>>> > [email protected]
>>> >
>>> > 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-devel
>>
>>

_______________________________________________
relax (http://www.nmr-relax.com)

This is the relax-devel mailing list
[email protected]

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-devel

Reply via email to