mailRunning relax and inspect interactively after running script


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

Header


Content

Posted by Troels Emtekær Linnet on December 10, 2013 - 15:11:
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


Related Messages


Powered by MHonArc, Updated Tue Dec 10 15:40:09 2013