\(\renewcommand\AA{\unicode{x212B}}\)
Much of Mantid can be scripted using Python. There are currently three ways of running Mantid related Python code:
Each of the above ‘environments’ has a separate scope. What this means is that each environment (including each tab on the script window) is separated when it comes to running code. For example, writing the following code in a tab within the script window
x = 1
print(x)
and executing it in the same tab then it will print “1” to the output window. However, opening the script interpreter and executing
print(x)
will result in the following error: NameError on line 1: “name ‘x’ is not defined”. This is because x is only defined in the place where x=1 was executed.
Contents