Dear Edward.
I am trying with this code:
if script_file and status.prompt:
#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)
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=self.__intro_string, local=locals())
If I add the "return" command, relax quits after execution of the code.
Without adding the return code, I will get relax running the code, but the variable in the script is not available. ?
----------------------------------------------------------------------------------------------------------------
[tlinnet@tomat relax_trunk]$ ./relax -p test.py
relax repository checkout rNone
None
Molecular dynamics by NMR data analysis
Copyright (C) 2001-2006 Edward d'Auvergne
Copyright (C) 2006-2014 the relax development team
This is free software which you are welcome to modify and redistribute under the conditions of the
GNU General Public License (GPL). This program, including all modules, is licensed under the GPL
and comes with absolutely no warranty. For details type 'GPL' within the relax prompt.
Assistance in using the relax prompt and scripting interface can be accessed by typing 'help' within
the prompt.
Processor fabric: Uni-processor.
script = 'test.py'
----------------------------------------------------------------------------------------------------
a = 10
print "helo"
----------------------------------------------------------------------------------------------------
helo
relax repository checkout rNone
None
Molecular dynamics by NMR data analysis
Copyright (C) 2001-2006 Edward d'Auvergne
Copyright (C) 2006-2014 the relax development team
This is free software which you are welcome to modify and redistribute under the conditions of the
GNU General Public License (GPL). This program, including all modules, is licensed under the GPL
and comes with absolutely no warranty. For details type 'GPL' within the relax prompt.
Assistance in using the relax prompt and scripting interface can be accessed by typing 'help' within
the prompt.
Processor fabric: Uni-processor.
relax> print a
Traceback (most recent call last):
File "<console>", line 1, in <module>
NameError: name 'a' is not defined
relax> print test.a
Traceback (most recent call last):
File "<console>", line 1, in <module>
NameError: name 'test' is not defined