Switch from env variable to just local directory.
What can I say. I just don't like environment variables.
This commit is contained in:
parent
ee97a3d08e
commit
88ba4a3e23
2 changed files with 4 additions and 2 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -1 +1,2 @@
|
|||
PGUI/
|
||||
gitcheckup.txt
|
||||
|
|
5
PGUI.pyw
5
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]
|
||||
|
|
Loading…
Reference in a new issue