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
finesse
pykat
Commits
eb1faaf9
Commit
eb1faaf9
authored
Dec 12, 2013
by
Andreas Freise
Browse files
adding a savescript function, useful for temporary storage of kat object
in readable form.
parent
7af711e5
Changes
1
Hide whitespace changes
Inline
Side-by-side
pykat/finesse.py
View file @
eb1faaf9
...
...
@@ -230,6 +230,20 @@ class kat(object):
pykat
.
commands
.
gauss
.
parseFinesseText
(
line
)
self
.
__currentTag
=
NO_BLOCK
def
saveScript
(
self
,
filename
=
None
):
"""
Saves the current kat object to a Finesse input file
"""
try
:
katScript
=
""
.
join
(
self
.
generateKatScript
())
katfile
=
open
(
filename
,
'w'
)
katfile
.
writelines
(
katScript
)
katfile
.
flush
()
katfile
.
close
()
except
BasePyKatException
as
ex
:
print
ex
def
run
(
self
,
printout
=
1
,
printerr
=
1
,
save_output
=
False
,
save_kat
=
False
,
kat_name
=
None
)
:
"""
...
...
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