Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
R
Root
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Admin message
为了安全,强烈建议开启2FA双因子认证:User Settings -> Account -> Enable two-factor authentication!!!
Show more breadcrumbs
cxwx
Root
Commits
07b372ee
Commit
07b372ee
authored
8 years ago
by
Enric Tejedor Saavedra
Browse files
Options
Downloads
Patches
Plain Diff
Adapt to Python3 syntax: print
parent
d13ef8e5
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
bindings/pyroot/JupyROOT/cppcompleter.py
+6
-6
6 additions, 6 deletions
bindings/pyroot/JupyROOT/cppcompleter.py
bindings/pyroot/JupyROOT/handlers.py
+5
-5
5 additions, 5 deletions
bindings/pyroot/JupyROOT/handlers.py
with
11 additions
and
11 deletions
bindings/pyroot/JupyROOT/cppcompleter.py
+
6
−
6
View file @
07b372ee
...
@@ -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
):
...
...
This diff is collapsed.
Click to expand it.
bindings/pyroot/JupyROOT/handlers.py
+
5
−
5
View file @
07b372ee
...
@@ -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
):
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment