Commit 4ea68bda authored by Aaron Jones's avatar Aaron Jones
Browse files

Modified __init__ to allow the use of pykat without finesse.

Pykat will throw a warning every time the user requests a attribute
of the kat object.
parent 97f3c575
......@@ -49,9 +49,19 @@ from import use as set_plot_style
from .SIfloat import SIfloat
kat = finesse.kat()
v = kat.finesse_version()
kat = finesse.kat()
v = kat.finesse_version()
except pkex.MissingFinesse:
from warnings import warn
msg = "Could not find the finesse executable 'kat'" \
"or you do not have the permissions to run it."
class nokat(object):
def __getattribute__(self, attr):
kat = nokat()
v = str(__min_req_finesse__)
if float(v.split('-')[0]) < __min_req_finesse__:
raise pkex.BasePyKatException("Pykat %s requires Finesse version %s or higher. You have have %s" % (__version__ ,
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