From e915b6daef13bf87c3c788e62066544589e3a2de Mon Sep 17 00:00:00 2001 From: Shlomi Fish Date: Tue, 1 May 2018 14:45:22 +0300 Subject: [PATCH] configurable filename. --- pysollib/ui/tktile/menubar.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pysollib/ui/tktile/menubar.py b/pysollib/ui/tktile/menubar.py index b9314359..c692b3d6 100644 --- a/pysollib/ui/tktile/menubar.py +++ b/pysollib/ui/tktile/menubar.py @@ -1226,12 +1226,13 @@ Unsupported game for import. if not idir: idir = self.app.dn.savegames d = tkinter_tkfiledialog.Open() - if 'PYSOL_DEBUG_IMPORT' not in os.environ: + key = 'PYSOL_DEBUG_IMPORT' + if key not in os.environ: filename = d.show(filetypes=self.FILETYPES, defaultextension=self.DEFAULTEXTENSION, initialdir=idir, initialfile=ifile) else: - filename = '/home/shlomif/m2.txt' + filename = os.environ[key] if filename: filename = os.path.normpath(filename) # filename = os.path.normcase(filename)