RE: RE: PyQt and PyROOT

From: Fine, Valeri <fine_at_bnl.gov>
Date: Tue, 16 Jan 2007 23:59:13 -0500


Hi Wim, I think the poor guys will welcome your comments and kind assistance.  

>if you want just the opposite,
 

I hope these guys will explain you better what they want ;) What about me.
I am very sorry, but I still have to write my first Python script yet :)  

My best regards, Valeri


From: WLavrijsen_at_lbl.gov [mailto:WLavrijsen_at_lbl.gov] Sent: Tue 1/16/2007 11:17 PM
To: Fine, Valeri
Cc: Luca Baldini; Johan Bregeon; ROOT Talk Subject: RE: [ROOT] RE: PyQt and PyROOT

Valeri,

> May be Wim can look up the C++ code sent last time to tell us where, how,
> and when the PyROOT implements the
>
> TRint *theApp = new TRint("Rint", &argc, argv);
>
> and
>
> theApp->Run();
>
> May be the only thing you should do is to call
>
> gApplication.Run()

there is no such call b/c it would interfere with the normal python command line interpreter processing (the call doesn't return until done, so all that time no python code will be executed). The way PyROOT is implemented means that ROOT is invoked from Python, not the other way around; if you want just the opposite, you can start with CINT, then call python:

 $ cat runpython.C
 {

    gSystem->Load( "libPyROOT" );
    TPython::Prompt();
 }
 $ root -l -q runpython.C
 root [0]
 Processing runpython.C...
 >>>

Or similarly TPython::ExecScript() to start a python script from CINT (still in-process). That way, you can do any normal setup the RINT way, as you like, and f'up with running python.

Best regards,

           Wim

--
Wim.Lavrijsen_at_cern.ch   --   WLavrijsen_at_lbl.gov   --   www.lavrijsen.net

"Stop making excuses for your software."    --first step towards quality
   "GIGO is not a valid design pattern."         --corollary
Received on Wed Jan 17 2007 - 05:59:50 CET

This archive was generated by hypermail 2.2.0 : Wed Jan 17 2007 - 17:50:00 CET