Dear all,
these few lines of code:
#!/bin/env python2.5
import ROOT
print "a"
ROOT.TH1 # (or anything else using a root type).
print “b”
executed like this
./my_pyrootargv.py --someargument ‘$,^’
gives this results:
a
Error in TSystem::ExpandFileName: input: $,^, output: $,^
Error in TSystem::ExpandFileName: input: $,^, output: $,^
Error in TSystem::ExpandFileName: input: /afs/cern.ch/user/j/jlundber/example/scripts/./$,^, output: /afs/cern.ch/user/j/jlundber/example/scripts/./$,^
Error in TSystem::ExpandFileName: input: /afs/cern.ch/sw/lcg/app/releases/ROOT/5.22.00d/slc4_ia32_gcc34/root/macros/$,^, output: /afs/cern.ch/sw/lcg/app/releases/ROOT/5.22.00d/slc4_ia32_gcc34/root/macros/$,^
b
Inserting sys.argv[1:]=[] quiets the root module. I have some comments/questions:
To me it’s very strange if not wrong that root is parsing argv when loaded as a python module. The argv options are not for root.
Can I turn off or catch this kind of messages from the root module? I mean in general.
Who is trying to interpret my options as filenames?