Skip to content
Snippets Groups Projects
Commit 07b372ee authored by Enric Tejedor Saavedra's avatar Enric Tejedor Saavedra
Browse files

Adapt to Python3 syntax: print

parent d13ef8e5
No related branches found
No related tags found
No related merge requests found
...@@ -35,7 +35,7 @@ class CppCompleter(object): ...@@ -35,7 +35,7 @@ class CppCompleter(object):
>>> comp = CppCompleter() >>> comp = CppCompleter()
>>> comp.activate() >>> comp.activate()
>>> for suggestion in comp._completeImpl("TH1"): >>> for suggestion in comp._completeImpl("TH1"):
... print suggestion ... print(suggestion)
TH1 TH1
TH1C TH1C
TH1D TH1D
...@@ -45,7 +45,7 @@ class CppCompleter(object): ...@@ -45,7 +45,7 @@ class CppCompleter(object):
TH1K TH1K
TH1S TH1S
>>> for suggestion in comp._completeImpl("TH2"): >>> for suggestion in comp._completeImpl("TH2"):
... print suggestion ... print(suggestion)
TH2 TH2
TH2C TH2C
TH2D TH2D
...@@ -58,20 +58,20 @@ class CppCompleter(object): ...@@ -58,20 +58,20 @@ class CppCompleter(object):
TH2S TH2S
>>> garbage = ROOT.gInterpreter.ProcessLine("TH1F* h") >>> garbage = ROOT.gInterpreter.ProcessLine("TH1F* h")
>>> for suggestion in comp._completeImpl("h->GetA"): >>> for suggestion in comp._completeImpl("h->GetA"):
... print suggestion ... print(suggestion)
h->GetArray h->GetArray
h->GetAsymmetry h->GetAsymmetry
h->GetAt h->GetAt
h->GetAxisColor h->GetAxisColor
>>> garbage = ROOT.gInterpreter.ProcessLine("TH1F aa") >>> garbage = ROOT.gInterpreter.ProcessLine("TH1F aa")
>>> for suggestion in comp._completeImpl("aa.Add("): >>> for suggestion in comp._completeImpl("aa.Add("):
... print suggestion.replace("\\t"," ") ... print(suggestion.replace("\\t"," "))
<BLANKLINE> <BLANKLINE>
Bool_t Add(TF1* h1, Double_t c1 = 1, Option_t* option = "") Bool_t Add(TF1* h1, Double_t c1 = 1, Option_t* option = "")
Bool_t Add(const TH1* h, const TH1* h2, Double_t c1 = 1, Double_t c2 = 1) // *MENU* Bool_t Add(const TH1* h, const TH1* h2, Double_t c1 = 1, Double_t c2 = 1) // *MENU*
Bool_t Add(const TH1* h1, Double_t c1 = 1) Bool_t Add(const TH1* h1, Double_t c1 = 1)
>>> for suggestion in comp._completeImpl("TROOT::Is"): >>> for suggestion in comp._completeImpl("TROOT::Is"):
... print suggestion ... print(suggestion)
IsA IsA
IsBatch IsBatch
IsEqual IsEqual
...@@ -89,7 +89,7 @@ class CppCompleter(object): ...@@ -89,7 +89,7 @@ class CppCompleter(object):
IsZombie IsZombie
>>> comp.deactivate() >>> comp.deactivate()
>>> for suggestion in comp._completeImpl("TG"): >>> for suggestion in comp._completeImpl("TG"):
... print suggestion ... print(suggestion)
''' '''
def __init__(self): def __init__(self):
......
...@@ -65,7 +65,7 @@ class Runner(object): ...@@ -65,7 +65,7 @@ class Runner(object):
''' Asynchrously run functions ''' Asynchrously run functions
>>> import time >>> import time
>>> def f(code): >>> def f(code):
... print code ... print(code)
>>> r= Runner(f) >>> r= Runner(f)
>>> r.Run("ss") >>> r.Run("ss")
ss ss
...@@ -73,16 +73,16 @@ class Runner(object): ...@@ -73,16 +73,16 @@ class Runner(object):
ss ss
>>> def g(msg): >>> def g(msg):
... time.sleep(.5) ... time.sleep(.5)
... print msg ... print(msg)
>>> r= Runner(g) >>> r= Runner(g)
>>> r.AsyncRun("Asynchronous");print "Synchronous";time.sleep(1) >>> r.AsyncRun("Asynchronous");print("Synchronous");time.sleep(1)
Synchronous Synchronous
Asynchronous Asynchronous
>>> r.AsyncRun("Asynchronous"); print r.HasFinished() >>> r.AsyncRun("Asynchronous"); print(r.HasFinished())
False False
>>> time.sleep(1) >>> time.sleep(1)
Asynchronous Asynchronous
>>> print r.HasFinished() >>> print(r.HasFinished())
True True
''' '''
def __init__(self, function): def __init__(self, function):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment