Hi,

This 'interactive' mode is not present in relax.  Instead you would go
into the prompt mode and use the script user function.  The script
will run and you'll still be in the prompt.  However if you wish to
have such a feature, a branch can be created for you to develop it.
As for the variables being accessible, this is a different question.
The scripts are run as modules, hence they have their own separate
name space.  For the test.py script, you could for example run:

relax> import test
4
relax> print test.b
4
relax>

Regards,

Edawrd


On 10 December 2013 15:10, Troels Emtekær Linnet <[email protected]> wrote:
> Hej relax.
>
> When runs python, it can be done with:
> python -i script.py
>
> There after one can continue examining the variables.
>
> Is the same feature available in relax?
>
> if test.py contains:
> t=2
> b=t*2
> print(b)
>
> If I do:
> --------
> relax script.py
> ------
>
> It prints, and quit.
>
> If i do:
> ----------------
> relax
> relax> script('test.py')
> script = 'test.py'
> ----------------------------------------------------------------------------------------------------
> t=2
> b=t*2
> print(b)
> ----------------------------------------------------------------------------------------------------
> 4
>
> relax> print b
> Traceback (most recent call last):
>   File "<console>", line 1, in <module>
> NameError: name 'b' is not defined
> -----------------
>
> Is it possible to run a script and still have access to the variables?
>
> Best
> Troels
>
>
> _______________________________________________
> 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