Skip to content
Snippets Groups Projects
Commit f37ade6a authored by Daniel Brown's avatar Daniel Brown
Browse files

tidy up messages

parent f05991ad
Branches
No related tags found
No related merge requests found
...@@ -190,6 +190,7 @@ class KatBatch(object): ...@@ -190,6 +190,7 @@ class KatBatch(object):
""" """
def __init__(self): def __init__(self):
from IPython.parallel import Client from IPython.parallel import Client
...@@ -683,6 +684,8 @@ class kat(object): ...@@ -683,6 +684,8 @@ class kat(object):
return object.__new__(cnew) return object.__new__(cnew)
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.__looking = False
self.scene = None # scene object for GUI self.scene = None # scene object for GUI
self.verbose = True self.verbose = True
self.__blocks = OrderedDict() # dictionary of blocks that are used self.__blocks = OrderedDict() # dictionary of blocks that are used
...@@ -1460,11 +1463,14 @@ class kat(object): ...@@ -1460,11 +1463,14 @@ class kat(object):
if time.time() < start + duration: if time.time() < start + duration:
time.sleep(0.1) time.sleep(0.1)
fifo = open(pipe_name, "r") fifo = open(pipe_name, "r")
self.__looking = False
else: else:
raise Exception("Could not connect to pykat pipe in {0} seconds.".format(duration)) raise Exception("Could not connect to pykat pipe in {0} seconds. Ensure you are using Finesse >= v2.1 and Pykat >= v1.0.0.".format(duration))
except FileNotFoundError as ex: except FileNotFoundError as ex:
if self.verbose: if self.verbose:
print("Looking for pipe...") if not self.__looking:
print("Looking for pykat pipe...")
self.__looking = True
for line in fifo: for line in fifo:
v = line.split(":", 1) v = line.split(":", 1)
...@@ -1650,7 +1656,7 @@ class kat(object): ...@@ -1650,7 +1656,7 @@ class kat(object):
finally: finally:
if self.verbose: if self.verbose:
print ("") print ("")
print ("Finished in " + str(time.time() + start)) print ("Finished in {0:g} seconds".format(float(time.time() - start)))
def remove(self, obj): def remove(self, obj):
try: try:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment