Hi Federico,
I have no idea, I never use Python...
Wim, could you follow, please?
Cheers, Bertrand.
From: Federico Roncarolo
Sent: Monday, November 23, 2009 16:33
To: Bertrand Bellenot
Cc: roottalk_at_root.cern.ch
Subject: Re: [ROOT] GTK & ROOT
Hi, thanks a lot for the hint.
Unfortunately, using python I'm already stuck with creating the TAppliaction. My simple test is :
import numpy
import pygtk
pygtk.require('2.0')
import gtk,sys
# create an instance of TApplication
sys.argv=numpy.array(sys.argv) #in order tohave sys.argv interpreted
gMyRootApp = ROOT.TApplication("My ROOT Application", len(sys.argv),sys.argv)
# tell application to return from run
gMyRootApp.SetReturnFromRun(true);
and I get:
Traceback (most recent call last):
File "test.py", line 12, in <module>
gMyRootApp = ROOT.TApplication("My ROOT Application", len(sys.argv),sys.argv)
File "/root/lib/root/ROOT.py", line 391, in __getattr1
self.__finalSetup()
File "/root/lib/root/ROOT.py", line 454, in __finalSetup
if appc.CreatePyROOTApplication():
Exception: std::bad_alloc (C++ exception)
What are the argc and argv calls supposed to pass? (in my case of course argv contains ['python','filetest.py']
Many thanks,
Federico
On Nov 23, 2009, at 10:19 AM, Bertrand Bellenot wrote:
http://root.cern.ch/root/Version51000.news.html Received on Mon Nov 23 2009 - 16:47:09 CET
This archive was generated by hypermail 2.2.0 : Tue Nov 24 2009 - 05:50:03 CET