Commit 0112f5dc authored by Andreas Freise's avatar Andreas Freise
Browse files

adding a verbose flag.

parent e550cf73
......@@ -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 = ""
......
Markdown is supported
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