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
Sebastian Steinlechner
pykat
Commits
700b2620
Commit
700b2620
authored
May 03, 2016
by
Daniel Brown
Committed by
Daniel Brown
May 03, 2016
Browse files
fixing computation time parsing, more utf8 stuff
parent
6b628184
Changes
1
Show whitespace changes
Inline
Side-by-side
pykat/finesse.py
View file @
700b2620
...
...
@@ -1541,12 +1541,14 @@ class kat(object):
(
stdout
,
stderr
)
=
p
.
communicate
()
r
.
stdout
=
stdout
#
.decode('u
nicode_escape
')
r
.
stderr
=
stderr
#
.decode('u
nicode_escape
')
r
.
stdout
=
stdout
.
decode
(
'u
tf-8
'
)
r
.
stderr
=
stderr
.
decode
(
'u
tf-8
'
)
for
line
in
r
.
stdout
[::
-
1
]:
if
line
.
lstrip
().
startswith
(
'computation time:'
):
k
=
r
.
stdout
.
rfind
(
'computation time:'
)
if
k
>
0
:
try
:
line
=
r
.
stdout
[
k
:]
r
.
runtime
=
float
(
line
.
split
(
":"
)[
1
].
replace
(
"s"
,
""
))
except
:
r
.
runtime
=
0.0
...
...
Write
Preview
Supports
Markdown
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