We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 332afb0 commit c0053d4Copy full SHA for c0053d4
swat/clib.py
@@ -137,7 +137,12 @@ def InitializeTK(*args, **kwargs):
137
''' Initialize the TK subsystem (importing _pyswat as needed) '''
138
if _pyswat is None:
139
_import_pyswat()
140
- return _pyswat.InitializeTK(*args, **kwargs)
+ out = _pyswat.InitializeTK(*args, **kwargs)
141
+ # Override TKPATH after initialization so that other TK applications
142
+ # won't be affected.
143
+ if sys.platform.lower().startswith('win') and 'TKPATH' not in os.environ:
144
+ os.environ['TKPATH'] = os.pathsep
145
+ return out
146
147
148
def errorcheck(expr, obj):
0 commit comments