Skip to content
Snippets Groups Projects
Commit 0112f5dc authored by Andreas Freise's avatar Andreas Freise
Browse files

adding a verbose flag.

parent e550cf73
No related branches found
No related tags found
No related merge requests found
...@@ -79,6 +79,7 @@ class kat(object): ...@@ -79,6 +79,7 @@ class kat(object):
def __init__(self, kat_file=None, kat_code=None, katdir="", katname="", tempdir=None, tempname=None): def __init__(self, kat_file=None, kat_code=None, katdir="", katname="", tempdir=None, tempname=None):
self.scene = None # scene object for GUI self.scene = None # scene object for GUI
self.verbose = True
self.__blocks = {} # dictionary of blocks that are used self.__blocks = {} # dictionary of blocks that are used
self.__components = {} # dictionary of optical components self.__components = {} # dictionary of optical components
self.__detectors = {} # dictionary of detectors self.__detectors = {} # dictionary of detectors
...@@ -201,6 +202,7 @@ class kat(object): ...@@ -201,6 +202,7 @@ class kat(object):
elif(first == "xaxis" or first == "x2axis" or first == "xaxis*" or first == "x2axis*"): elif(first == "xaxis" or first == "x2axis" or first == "xaxis*" or first == "x2axis*"):
obj = pykat.commands.xaxis.parseFinesseText(line) obj = pykat.commands.xaxis.parseFinesseText(line)
else: else:
if self.verbose:
print "Parsing `{0}` into pykat object not implemented yet, added as extra line.".format(line) print "Parsing `{0}` into pykat object not implemented yet, added as extra line.".format(line)
obj = line obj = line
# manually add the line to the block contents # manually add the line to the block contents
...@@ -260,6 +262,7 @@ class kat(object): ...@@ -260,6 +262,7 @@ class kat(object):
cmd.append('--no-backspace') cmd.append('--no-backspace')
cmd.append(katfile.name) cmd.append(katfile.name)
if self.verbose:
print cmd print cmd
p=subprocess.Popen(cmd, shell=False, stdout=subprocess.PIPE, stderr=subprocess.PIPE) p=subprocess.Popen(cmd, shell=False, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
err = "" err = ""
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment