How to call TPyException in Python?

From: OKUMURA, Akira <oxon_at_astro.isas.jaxa.jp>
Date: Tue, 3 May 2011 18:04:44 -0700


Hello ROOTers,

I would like to know how to make an instance of PyROOT::TPyException inside python interpreter. I get the following error on OS X 10.6 + Python 2.6.1 + ROOT 5.29/01.



$ python
Python 2.6.1 (r261:67515, Jun 24 2010, 21:47:49) [GCC 4.2.1 (Apple Inc. build 5646)] on darwin Type "help", "copyright", "credits" or "license" for more information.
>>> import ROOT
>>> e = ROOT.PyROOT.TPyException()

TClass::TClass:0: RuntimeWarning: no dictionary for class exception is available TClass::TClass:0: RuntimeWarning: no dictionary for class exception is available TypeError: type 'instance' is not an acceptable base type Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
AttributeError: type object 'PyROOT' has no attribute 'TPyException'

Regards,

--
OKUMURA, Akira oxon@{astro.isas.jaxa.jp,stanford.edu}
Institute of Space and Astronautical Science (ISAS/JAXA)
Now at KIPAC/SLAC/Stanford
Varian Physics #306, 382 Via Pueblo Mall, MC 4060
Stanford, CA 94305-4060
TEL 650-736-0971/FAX 650-724-5065
Skype : okumura.akira
Received on Wed May 04 2011 - 03:04:56 CEST

This archive was generated by hypermail 2.2.0 : Thu May 05 2011 - 05:50:01 CEST