Commit aa201fd2 authored by Andreas Freise's avatar Andreas Freise
Browse files

adding a removeLine method to kat, to allow me to remove wrong

code lines that were not parsed into an object but have been
added as extra lines. This works for me, but we could do
something more sophisticated if needed.
parent 7bfb9432
......@@ -605,7 +605,16 @@ class kat(object):
y = data[1:cols].squeeze()
return [x, y, hdr]
def removeLine(self, fragment) :
for key in self.__blocks:
objs = self.__blocks[key].contents
for obj in objs:
if isinstance(obj, str):
if fragment in obj:
print " ** removing line '{0}'".format(obj)
objs.remove(obj)
def generateKatScript(self) :
""" Generates the kat file which can then be run """
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment