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
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
finesse
pykat
Commits
e940d8bf
Commit
e940d8bf
authored
11 years ago
by
Andreas Freise
Browse files
Options
Downloads
Patches
Plain Diff
starting to add reading of FTblock/FTend feature.
parent
8223e4ab
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
pykat/finesse.py
+14
-0
14 additions, 0 deletions
pykat/finesse.py
with
14 additions
and
0 deletions
pykat/finesse.py
+
14
−
0
View file @
e940d8bf
...
...
@@ -31,6 +31,7 @@ import numpy as np
import
datetime
import
pickle
import
pykat
import
warnings
from
pykat.exceptions
import
*
...
...
@@ -120,10 +121,23 @@ class kat(object):
def
parseCommands
(
self
,
commands
):
blockComment
=
False
currentTag
=
""
for
line
in
commands
.
split
(
"
\n
"
):
if
len
(
line
.
strip
())
>=
2
:
line
=
line
.
strip
()
# Looking for block start or end
if
line
[
0
:
3
]
==
"
%%%
"
:
values
=
text
.
split
(
"
"
)
if
values
[
1
]
==
"
FTblock
"
:
newTag
=
values
[
2
]
if
values
[
1
]
==
"
FTend
"
:
if
currentTag
!=
values
[
2
]:
warnings
.
warn
(
"
Found FTend {0} but expected block {1) to end
"
.
format
(
values
[
2
],
currentTag
))
currentTag
=
""
continue
# don't read comment lines
if
line
[
0
]
==
"
#
"
or
line
[
0
]
==
"
%
"
:
continue
...
...
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