def saveImagePathAsHome(patient):
    file = os.path.abspath(patient.photo)
    cf.set("home_file", file)
    if not cf.isIn("home_dir") or not os.path.isdir(cf.get("home_dir")):
        directory = os.path.abspath(os.path.dirname(file)) + os.sep
        cf.set("home_dir", directory)
Beispiel #2
0
def load(language=DEFAULT_LANG):
    global messages
    language = cf.get("language") if cf.isIn("language") else DEFAULT_LANG
    with open("files/lang/%s.json" % language) as f:
        messages = json.load(f)