Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
finesse
pykat
Commits
0112f5dc
Commit
0112f5dc
authored
Dec 05, 2013
by
Andreas Freise
Browse files
adding a verbose flag.
parent
e550cf73
Changes
1
Hide whitespace changes
Inline
Side-by-side
pykat/finesse.py
View file @
0112f5dc
...
...
@@ -79,6 +79,7 @@ class kat(object):
def
__init__
(
self
,
kat_file
=
None
,
kat_code
=
None
,
katdir
=
""
,
katname
=
""
,
tempdir
=
None
,
tempname
=
None
):
self
.
scene
=
None
# scene object for GUI
self
.
verbose
=
True
self
.
__blocks
=
{}
# dictionary of blocks that are used
self
.
__components
=
{}
# dictionary of optical components
self
.
__detectors
=
{}
# dictionary of detectors
...
...
@@ -201,7 +202,8 @@ class kat(object):
elif
(
first
==
"xaxis"
or
first
==
"x2axis"
or
first
==
"xaxis*"
or
first
==
"x2axis*"
):
obj
=
pykat
.
commands
.
xaxis
.
parseFinesseText
(
line
)
else
:
print
"Parsing `{0}` into pykat object not implemented yet, added as extra line."
.
format
(
line
)
if
self
.
verbose
:
print
"Parsing `{0}` into pykat object not implemented yet, added as extra line."
.
format
(
line
)
obj
=
line
# manually add the line to the block contents
self
.
__blocks
[
self
.
__currentTag
].
contents
.
append
(
line
)
...
...
@@ -260,7 +262,8 @@ class kat(object):
cmd
.
append
(
'--no-backspace'
)
cmd
.
append
(
katfile
.
name
)
print
cmd
if
self
.
verbose
:
print
cmd
p
=
subprocess
.
Popen
(
cmd
,
shell
=
False
,
stdout
=
subprocess
.
PIPE
,
stderr
=
subprocess
.
PIPE
)
err
=
""
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment