Hi Martin,
yes, add ‘-b’ on the command line. Either by:$ python <somescript>.py -b
when running a script, or by $ python - -b
when running interactively, or by putting ‘-b’ directly into sys.argv before loading PyROOT:import sys
sys.argv.append( '-b-' )
import ROOT
when loading the code as a module only.
The ‘-b’ is in all cases forwarded to the TApplication which will then take care of it properly; internally, PyROOT will not start the GUI thread (which can be terminated as well be setting ROOT.keeppolling to 0, but be careful not to do that while you’re having any canvases open).
HTH,
Wim