def save(): global questnow global seqnow global currfile if (currfile != "Unsaved"): nlns.nsave(str(questnow), str(seqnow), currfile) else: saveas()
def filenameinput(window, e, s=""): global currfile s = e.get() currfile = s print(currfile, s, e) fwithn = [ i.replace(".nbsf", "") for i in os.listdir(os.path.realpath("..") + "\\SAV") if (currfile in i and ".nbsf" in i) ] fwnl = len(fwithn) print(fwithn, fwnl) s1 = "" if s + ".nbsf" in os.listdir(os.path.realpath("..") + "\\SAV"): s1 = s + "_{n}".format(n=fwnl) currfile = s1 global questnow global seqnow nlns.nsave(str(questnow), str(seqnow), currfile) window.destroy()