mirror of
https://github.com/EDCD/EDMarketConnector.git
synced 2025-06-11 12:52:30 +03:00
chdir() to __file__ when not running frozen
This commit is contained in:
parent
103e856446
commit
0b88117844
@ -6,6 +6,7 @@ import argparse
|
|||||||
import html
|
import html
|
||||||
import json
|
import json
|
||||||
import locale
|
import locale
|
||||||
|
import pathlib
|
||||||
import re
|
import re
|
||||||
import sys
|
import sys
|
||||||
import webbrowser
|
import webbrowser
|
||||||
@ -27,6 +28,11 @@ if getattr(sys, 'frozen', False):
|
|||||||
environ['TCL_LIBRARY'] = join(dirname(sys.path[0]), 'lib', 'tcl')
|
environ['TCL_LIBRARY'] = join(dirname(sys.path[0]), 'lib', 'tcl')
|
||||||
environ['TK_LIBRARY'] = join(dirname(sys.path[0]), 'lib', 'tk')
|
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
|
from constants import applongname, appname, protocolhandler_redirect
|
||||||
|
|
||||||
# config will now cause an appname logger to be set up, so we need the
|
# config will now cause an appname logger to be set up, so we need the
|
||||||
|
Loading…
x
Reference in New Issue
Block a user