diff --git a/EDMarketConnector.py b/EDMarketConnector.py index 87bee355..3bf232f2 100755 --- a/EDMarketConnector.py +++ b/EDMarketConnector.py @@ -6,6 +6,7 @@ import argparse import html import json import locale +import pathlib import re import sys import webbrowser @@ -27,6 +28,11 @@ if getattr(sys, 'frozen', False): environ['TCL_LIBRARY'] = join(dirname(sys.path[0]), 'lib', 'tcl') environ['TK_LIBRARY'] = join(dirname(sys.path[0]), 'lib', 'tk') +else: + # We still want to *try* to have CWD be where the main script is, even if + # not frozen. + chdir(pathlib.Path(__file__).parent) + from constants import applongname, appname, protocolhandler_redirect # config will now cause an appname logger to be set up, so we need the