-h option

I’ve implemented a lot of options for my program using optparse, but when I call python myapplication.py -h I got the ROOT help:

Usage: python [-l] [-b] [-n] [-q] [dir] [[file:]data.root] [file1.C ... fileN.C]
Options:
  -b : run in batch mode without graphics
  -n : do not execute logon and logoff macros as specified in .rootrc
  -q : exit after processing command line macro files
  -l : do not show splash screen
 dir : if dir is a valid directory cd to it before executing

How to avoid it?

Hi,

import ROOT ROOT.PyConfig.IgnoreCommandLineOptions = True
Cheers,
Wim

[quote=“wlav”]Hi,

import ROOT ROOT.PyConfig.IgnoreCommandLineOptions = True
Cheers,
Wim[/quote]

thanks, it works

Dear Guys,
I also want to make implementation of more commands in my python scripts.
However, I tried to used same instructions but it does not work.
Attached it for you in this msg.

Please, can you clarify this issue for me?

Thanks in advance,
Sandro Fonseca
UERJ/Brazil
pyrootHistCMS6.py (4.15 KB)

Hi,

the mentioned two lines have to be the very first lines of access of the ROOT module. If any other variables are touched before it, TApplication will be created, which takes the CLI options.

Cheers,
Wim

It is working!!!
Thanks a lot!

Sandro