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
6b2e8649
Commit
6b2e8649
authored
Dec 16, 2013
by
Daniel Brown
Browse files
adding verbose flags
parent
a439e44b
Changes
1
Hide whitespace changes
Inline
Side-by-side
pykat/finesse.py
View file @
6b2e8649
...
@@ -344,8 +344,8 @@ class kat(object):
...
@@ -344,8 +344,8 @@ class kat(object):
if
not
(
os
.
path
.
isfile
(
kat_exec
)
and
os
.
access
(
kat_exec
,
os
.
X_OK
)):
if
not
(
os
.
path
.
isfile
(
kat_exec
)
and
os
.
access
(
kat_exec
,
os
.
X_OK
)):
raise
MissingFinesse
()
raise
MissingFinesse
()
print
"--------------------------------------------------------------"
if
self
.
verbose
:
print
"--------------------------------------------------------------"
print
"Running kat - Started at "
+
str
(
start
)
if
self
.
verbose
:
print
"Running kat - Started at "
+
str
(
start
)
if
hasattr
(
self
,
"x2axis"
):
if
hasattr
(
self
,
"x2axis"
):
r
=
katRun2D
()
r
=
katRun2D
()
...
@@ -382,7 +382,7 @@ class kat(object):
...
@@ -382,7 +382,7 @@ class kat(object):
p
=
subprocess
.
Popen
(
cmd
,
shell
=
False
,
stdout
=
subprocess
.
PIPE
,
stderr
=
subprocess
.
PIPE
)
p
=
subprocess
.
Popen
(
cmd
,
shell
=
False
,
stdout
=
subprocess
.
PIPE
,
stderr
=
subprocess
.
PIPE
)
err
=
""
err
=
""
print
"Finesse binary output:"
if
self
.
verbose
:
print
"Finesse binary output:"
for
line
in
iter
(
p
.
stderr
.
readline
,
""
):
for
line
in
iter
(
p
.
stderr
.
readline
,
""
):
#err += line
#err += line
...
@@ -426,7 +426,7 @@ class kat(object):
...
@@ -426,7 +426,7 @@ class kat(object):
os
.
rename
(
outfile
,
newoutfile
)
os
.
rename
(
outfile
,
newoutfile
)
print
"
\n
Output data saved to '{0}'"
.
format
(
newoutfile
)
if
self
.
verbose
:
print
"
\n
Output data saved to '{0}'"
.
format
(
newoutfile
)
if
hasattr
(
self
,
"x2axis"
):
if
hasattr
(
self
,
"x2axis"
):
[
r
.
x
,
r
.
y
,
r
.
z
,
hdr
]
=
self
.
readOutFile
(
outfile
)
[
r
.
x
,
r
.
y
,
r
.
z
,
hdr
]
=
self
.
readOutFile
(
outfile
)
...
@@ -452,7 +452,7 @@ class kat(object):
...
@@ -452,7 +452,7 @@ class kat(object):
os
.
rename
(
katfile
.
name
,
newkatfile
)
os
.
rename
(
katfile
.
name
,
newkatfile
)
print
"Kat file saved to '{0}'"
.
format
(
newkatfile
)
if
self
.
verbose
:
print
"Kat file saved to '{0}'"
.
format
(
newkatfile
)
katfile
.
close
()
katfile
.
close
()
...
@@ -472,8 +472,8 @@ class kat(object):
...
@@ -472,8 +472,8 @@ class kat(object):
except
pkex
.
FinesseRunError
as
fe
:
except
pkex
.
FinesseRunError
as
fe
:
print
fe
print
fe
finally
:
finally
:
print
""
if
self
.
verbose
:
print
""
print
"Finished in "
+
str
(
datetime
.
datetime
.
now
()
-
start
)
if
self
.
verbose
:
print
"Finished in "
+
str
(
datetime
.
datetime
.
now
()
-
start
)
def
add
(
self
,
obj
):
def
add
(
self
,
obj
):
...
...
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