RE: RE: PyQt and PyROOT

From: <WLavrijsen_at_lbl.gov>
Date: Tue, 16 Jan 2007 20:17:58 -0800 (PST)


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:18:06 CET

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