Pyroot in batch mode?

Hi Martin,

yes, add ‘-b’ on the command line. Either by:$ python <somescript>.py -bwhen running a script, or by $ python - -bwhen running interactively, or by putting ‘-b’ directly into sys.argv before loading PyROOT:import sys sys.argv.append( '-b-' ) import ROOTwhen 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