Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
pykat
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Sebastian Steinlechner
pykat
Commits
42810831
Commit
42810831
authored
9 years ago
by
Daniel Brown
Browse files
Options
Downloads
Patches
Plain Diff
Adding progress message to pykat output for locks
parent
258facdb
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
pykat/__init__.py
+1
-1
1 addition, 1 deletion
pykat/__init__.py
pykat/finesse.py
+23
-9
23 additions, 9 deletions
pykat/finesse.py
with
24 additions
and
10 deletions
pykat/__init__.py
+
1
−
1
View file @
42810831
...
@@ -3,7 +3,7 @@ from __future__ import division
...
@@ -3,7 +3,7 @@ from __future__ import division
from
__future__
import
print_function
from
__future__
import
print_function
from
__future__
import
unicode_literals
from
__future__
import
unicode_literals
__version__
=
"
1.0.
3
"
__version__
=
"
1.0.
4
"
# This flag is used to switch on the gui features in pkat at import time
# This flag is used to switch on the gui features in pkat at import time
USE_GUI
=
False
USE_GUI
=
False
...
...
This diff is collapsed.
Click to expand it.
pykat/finesse.py
+
23
−
9
View file @
42810831
...
@@ -1370,7 +1370,7 @@ class kat(object):
...
@@ -1370,7 +1370,7 @@ class kat(object):
rethrowExceptions - if true exceptions will be thrown again rather than being excepted and calling sys.exit()
rethrowExceptions - if true exceptions will be thrown again rather than being excepted and calling sys.exit()
"""
"""
start
=
date
time
.
datetime
.
now
()
start
=
time
.
time
()
try
:
try
:
if
not
hasattr
(
self
,
"
xaxis
"
)
and
self
.
noxaxis
!=
None
and
self
.
noxaxis
==
False
:
if
not
hasattr
(
self
,
"
xaxis
"
)
and
self
.
noxaxis
!=
None
and
self
.
noxaxis
==
False
:
...
@@ -1400,7 +1400,7 @@ class kat(object):
...
@@ -1400,7 +1400,7 @@ class kat(object):
raise
pkex
.
MissingFinesse
()
raise
pkex
.
MissingFinesse
()
if
self
.
verbose
:
print
(
"
--------------------------------------------------------------
"
)
if
self
.
verbose
:
print
(
"
--------------------------------------------------------------
"
)
if
self
.
verbose
:
print
(
"
Running kat - Started at
"
+
str
(
start
))
if
self
.
verbose
:
print
(
"
Running kat - Started at
"
+
str
(
datetime
.
datetime
.
fromtimestamp
(
start
))
)
if
hasattr
(
self
,
"
x2axis
"
)
and
self
.
noxaxis
==
False
:
if
hasattr
(
self
,
"
x2axis
"
)
and
self
.
noxaxis
==
False
:
r
=
katRun2D
()
r
=
katRun2D
()
...
@@ -1458,17 +1458,25 @@ class kat(object):
...
@@ -1458,17 +1458,25 @@ class kat(object):
p
=
Popen
(
cmd
,
stderr
=
PIPE
,
stdout
=
PIPE
)
p
=
Popen
(
cmd
,
stderr
=
PIPE
,
stdout
=
PIPE
)
if
self
.
verbose
:
if
self
.
verbose
:
pb
=
progressbar
.
ProgressBar
()
if
self
.
noxaxis
:
maxval
=
1
else
:
maxval
=
100
widgets
=
[
progressbar
.
Percentage
(),
'
|
'
,
progressbar
.
ETA
(),
'
|
'
,
'
Status
'
]
pb
=
progressbar
.
ProgressBar
(
widgets
=
widgets
,
maxval
=
maxval
)
fifo
=
None
fifo
=
None
start
=
time
.
time
()
_start_kat
=
time
.
time
()
duration
=
2
# Duration for searching for open pipe
duration
=
2
# Duration for searching for open pipe
try
:
try
:
while
fifo
is
None
:
while
fifo
is
None
:
try
:
try
:
if
time
.
time
()
<
start
+
duration
:
if
time
.
time
()
<
_
start
_kat
+
duration
:
time
.
sleep
(
0.1
)
time
.
sleep
(
0.1
)
fifo
=
open
(
pipe_name
,
"
r
"
)
fifo
=
open
(
pipe_name
,
"
r
"
)
self
.
__looking
=
False
self
.
__looking
=
False
...
@@ -1481,7 +1489,11 @@ class kat(object):
...
@@ -1481,7 +1489,11 @@ class kat(object):
self
.
__looking
=
True
self
.
__looking
=
True
for
line
in
fifo
:
for
line
in
fifo
:
v
=
line
.
split
(
"
:
"
,
1
)
if
(
sys
.
version_info
<
(
3
,
0
)):
line
=
line
.
decode
(
"
utf8
"
)
# Make sure we're using unicode encoding
v
=
line
.
split
(
u
"
:
"
,
1
)
if
len
(
v
)
!=
2
:
if
len
(
v
)
!=
2
:
continue
continue
...
@@ -1490,11 +1502,12 @@ class kat(object):
...
@@ -1490,11 +1502,12 @@ class kat(object):
if
tag
==
"
version
"
:
if
tag
==
"
version
"
:
r
.
katVersion
=
line
r
.
katVersion
=
line
elif
tag
==
"
progress
"
:
elif
tag
==
"
progress
"
and
self
.
verbose
:
var
=
line
.
split
(
"
\t
"
)
var
=
line
.
split
(
"
\t
"
)
if
len
(
var
)
==
3
and
self
.
verbose
:
if
len
(
var
)
==
3
:
pb
.
currval
=
int
(
var
[
1
])
pb
.
currval
=
int
(
var
[
1
])
pb
.
widgets
[
-
1
]
=
var
[
0
]
+
"
"
+
var
[
2
][:
-
1
]
pb
.
update
()
pb
.
update
()
finally
:
finally
:
if
fifo
is
not
None
:
if
fifo
is
not
None
:
...
@@ -1666,6 +1679,7 @@ class kat(object):
...
@@ -1666,6 +1679,7 @@ class kat(object):
print
(
""
)
print
(
""
)
print
(
"
Finished in {0:g} seconds
"
.
format
(
float
(
time
.
time
()
-
start
)))
print
(
"
Finished in {0:g} seconds
"
.
format
(
float
(
time
.
time
()
-
start
)))
def
remove
(
self
,
obj
):
def
remove
(
self
,
obj
):
try
:
try
:
...
...
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