Re: Re: gApplication with pyroot

From: Tim Head <betatim_at_gmail.com>
Date: Fri, 26 Jun 2009 23:05:51 -0500


Hello,

2009/6/26 Alfio Rizzo <Alfio.Rizzo_at_vub.ac.be>:
> So, it somehow conflicts with root options, for instance I have my personal -b option
> that conflicts with ROOT -b to run in batch.
> That's why sometime it works and sometimes not, i.e. if I set this option or not..
> So, maybe have I to create 2 script one with the parser and the other with sys.argv ?
> Or just change the -b to -B .....
>

I sometimes use the following hack to stop ROOT from messing around with the commandline options:

import sys
_old_argv = sys.argv
sys.argv = []
import ROOT
ROOT.kTRUE
sys.argv = _old_argv
del _old_argv, ROOT

You have to do that only once right at the beginning of your program somewhere.

Tim

> Thanks
>
> Cheers
> A
>
>
> -----------------------------------------
> Alfio RIZZO
> Vrije Universiteit Brussel
> Faculteit Wetenschappen, Dienst ELEM
> Gebouw G, Bureau 0G-111
> Pleinlaan, 2 B-1050 Brussels BELGIUM
> Tel. +32(0)26293220 Fax +32(0)26293816
> alfio.rizzo_at_vub.ac.be
> -----------------------------------------
>
>

-- 
http://tim.jottit.com/
Received on Sat Jun 27 2009 - 06:06:01 CEST

This archive was generated by hypermail 2.2.0 : Sat Jun 27 2009 - 11:50:02 CEST