Re: Python on Mac OSX

From: <WLavrijsen_at_lbl.gov>
Date: Mon, 16 Jul 2007 12:57:15 -0700 (PDT)


Nathaniel,

> If, however, I use a more modern version of MacPython (2.4.4)

more modern is rather relative. :) That ancient version of python may need a minor tweak when installing on MacOSX 10.4. See e.g.:

   http://root.cern.ch/phpBB2/viewtopic.php?t=3226

but might be ok for MacPython, given that I'd expect them to take care of it.

> Here's the (slightly more detailed) dump when I do the latter: (ROOT 5.14.00f
> with PYTHON 2.4.4, which I'm doing in a vain attempt to compile GAUDI).

For Gaudi, one does not need "import ROOT", just "import PyCintex". Order, and loading one but not the other should not matter. However, can you see whether only loading PyCintex does work for you?

PyCintex is a library that fills CINT dictionary information from Reflex dictionary information. That way, one can use PyROOT on top of Reflex info rather than on top of (purely) CINT info.

> The line that is failing is:
> Cintex = libPyROOT.MakeRootClass( 'Cintex' )

What you're looking at is the "bootstrap" for Cintex: the first dictionary loaded is still a CINT one (which PyROOT understands), which is then called to enable Cintex (Reflex works through a callback, and the "enabling" installs that callback). See the file: cintex/inc/Cintex/Cintex.h in the root sources.

To see whether the dictionary for Cintex is properly build, you can load it into root.exe, either directly or by using the autoloader:

 root[0] Cintex::Enable()

or:

 root[0] gSystem->Load( "libCintex" )
 (int)0
 root[1] Cintex::Enable()

Can you verify that that works?

Then from there, verify the python equivalent:

 >>> import ROOT
 >>> ROOT.Cintex.Enable()
 >>>

or:

 >>> import ROOT
 >>> ROOT.gSystem.Load( "libCintex" )
 >>> ROOT.Cintex.Enable()
 >>>

this just to see whether there's a problem with an interaction of settings in PyCintex or whether there's a problem with the build.

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 Mon Jul 16 2007 - 21:57:23 CEST

This archive was generated by hypermail 2.2.0 : Tue Jul 17 2007 - 17:50:02 CEST