Switch from env variable to just local directory.

What can I say. I just don't like environment variables.
This commit is contained in:
voussoir 2020-01-26 16:57:47 -08:00
parent ee97a3d08e
commit 88ba4a3e23
2 changed files with 4 additions and 2 deletions

1
.gitignore vendored
View file

@ -1 +1,2 @@
PGUI/
gitcheckup.txt

View file

@ -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]