From 75307847706b2b90c054196f6982a1b395de04c7 Mon Sep 17 00:00:00 2001 From: Jonathan Harris Date: Mon, 30 Sep 2019 23:33:19 +0100 Subject: [PATCH] Allow Windows executable to be invoked from any cwd --- EDMarketConnector.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/EDMarketConnector.py b/EDMarketConnector.py index ea78f1bf..960d9b64 100755 --- a/EDMarketConnector.py +++ b/EDMarketConnector.py @@ -23,6 +23,9 @@ if getattr(sys, 'frozen', False): # Under py2exe sys.path[0] is the executable name if platform == 'win32': chdir(dirname(sys.path[0])) + # Allow executable to be invoked from any cwd + environ['TCL_LIBRARY'] = join(dirname(sys.path[0]), 'lib', 'tcl') + environ['TK_LIBRARY'] = join(dirname(sys.path[0]), 'lib', 'tk') import tkinter as tk from tkinter import ttk