just remove those lines:import libPyROOTand:c = libPyROOT.MakeRootClass( 'PyROOT::TPyROOTApplication' )
c.CreatePyROOTApplication()
Besides these being unsupported internals, the CreatePyROOTApplication call is a no-op in the way you’re using it here (the TPyROOTApplication is already created b/c of “from ROOT import …”).
Thanks a lot for the hint. The reason using it was that I can see the histogram. Not using it the Histogram closes it right away. Which way can I use to still see the output/Histogram when running my code in eclipse?
the canvas closes b/c Python exits. That behavior can not be explained with those lines, as they are truly a no-op if gApplication already exists.
I haven’t touched eclipse for years, so not sure what is the best course of action, but to keep the script alive, drop into interactive mode, wait for input (‘raw_input()’), or enter ‘ROOT.gApplication.Run()’.