Пример #1
0
def save():
    global body
    if not storyfile.current():
        choice = None
        while not choice in ["y", "n"]:
            choice = menu.menu_save()
        if choice == "y":
            database.commit_queue(storyfile.abs_to_sql())
            body = "Saved."
        elif choice == "n":
            pass
    else:
        body = "Nothing to save."
Пример #2
0
def save():
	global body
	if not storyfile.current():
		choice = None
		while not choice in ["y", "n"]:
			choice = menu.menu_save()
		if choice == "y":
			database.commit_queue(storyfile.abs_to_sql())
			body = "Saved."
		elif choice == "n":
			pass
	else:
		body = "Nothing to save."
Пример #3
0
def close():
    global context
    if not storyfile.current():
        choice = None
        while not choice in ["y", "n", "c"]:
            choice = menu.menu_close()
        if choice == "y":
            database.commit_queue(storyfile.abs_to_sql())
        elif choice == "n":
            pass
        else:
            return False
    database.conn.close()
    context = [VERSION, "INIT", None]
    return True
Пример #4
0
def close():
	global context
	if not storyfile.current():
		choice = None
		while not choice in ["y", "n", "c"]:
			choice = menu.menu_close()
		if choice == "y":
			database.commit_queue(storyfile.abs_to_sql())
		elif choice == "n":
			pass
		else:
			return False
	database.conn.close()
	context = [VERSION, "INIT", None]
	return True