Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Thomas Kluyver
Pycrystfel
Commits
f739b4e7
Commit
f739b4e7
authored
Jan 07, 2021
by
Thomas Kluyver
Browse files
Example script with progress bar
parent
b5307d41
Changes
2
Hide whitespace changes
Inline
Side-by-side
examples/progress_bar.py
0 → 100644
View file @
f739b4e7
"""Simple example to test building the bindings"""
import
time
from
pycrystfel.bindings
import
progress_bar
for
i
in
range
(
100
):
progress_bar
(
i
,
100
,
"Testing"
)
time
.
sleep
(
0.1
)
pycrystfel/bindings.pyx
View file @
f739b4e7
from
.
crystfel
cimport
*
from
.
cimport
crystfel
def
my_
progress_bar
(
val
,
total
,
text
):
progress_bar
(
val
,
total
,
text
)
def
progress_bar
(
val
,
total
,
text
):
crystfel
.
progress_bar
(
val
,
total
,
text
.
encode
()
)
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment