mirror of
https://github.com/EDCD/EDMarketConnector.git
synced 2025-06-07 19:03:23 +03:00
Allow Windows executable to be invoked from any cwd
This commit is contained in:
parent
9eb4dbd93e
commit
d71e3445c7
@ -23,6 +23,9 @@ if getattr(sys, 'frozen', False):
|
|||||||
# Under py2exe sys.path[0] is the executable name
|
# Under py2exe sys.path[0] is the executable name
|
||||||
if platform == 'win32':
|
if platform == 'win32':
|
||||||
chdir(dirname(sys.path[0]))
|
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
|
import tkinter as tk
|
||||||
from tkinter import ttk
|
from tkinter import ttk
|
||||||
|
Loading…
x
Reference in New Issue
Block a user