From 88ba4a3e2348359fb043c11810b2591deecc0b29 Mon Sep 17 00:00:00 2001 From: Ethan Dalool Date: Sun, 26 Jan 2020 16:57:47 -0800 Subject: [PATCH] Switch from env variable to just local directory. What can I say. I just don't like environment variables. --- .gitignore | 1 + PGUI.pyw | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 1cb863f..235b5a2 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ +PGUI/ gitcheckup.txt diff --git a/PGUI.pyw b/PGUI.pyw index d6c6e37..38d9a9a 100644 --- a/PGUI.pyw +++ b/PGUI.pyw @@ -7,8 +7,9 @@ import winshell def load_programs(): - directory = os.getenv('PGUI_DIR') - shortcuts = [os.path.join(directory, sname) for sname in os.listdir(directory)] + directory = os.path.join(os.path.dirname(__file__), 'PGUI') + shortcuts = [os.path.join(directory, p) for p in os.listdir(directory)] + shortcuts = [p for p in shortcuts if p.lower().endswith('.lnk')] programs = [] for shortcut in shortcuts: name = os.path.splitext(os.path.basename(shortcut))[0]