This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author Debarshi.Goswami
Recipients Debarshi.Goswami
Date 2013-11-14.11:12:35
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1384427555.71.0.261717374261.issue19582@psf.upfronthosting.co.za>
In-reply-to
Content
Tkinter is not working when I set PYTHONPATH using Py_SetPath before Initialization in an application embedding Python interpreter.

Any call to Py_SetPath is screwing up Tkinter with an error traceback -
-----------------------------------------------------
'Line 1789: Traceback (most recent call last):
  File "TestTK.py", line 33, in <module>
  File "C:\Python33\Lib\tkinter\__init__.py", line 1789, in __init__
    self.tk = _tkinter.create(screenName, baseName, className, interactive, wantobjects, useTk, sync, use)
_tkinter.TclError: Can't find a usable init.tcl in the following directories: 
    C:/Python33/lib/tcl8.5 .... and so on

This probably means that Tcl wasn't installed properly. 
-------------------------------------------------------------
But if set the 2 environment variable it works fine
set TCL_LIBRARY=C:\Python33\tcl\tcl8.5\
set TK_LIBRARY=C:\tcl\tk8.5\

If Py_SetPath is not called tkinter works well and tkwindow can be launched.

I am using Windows7 64 and Python 3.3.2
History
Date User Action Args
2013-11-14 11:12:35Debarshi.Goswamisetrecipients: + Debarshi.Goswami
2013-11-14 11:12:35Debarshi.Goswamisetmessageid: <1384427555.71.0.261717374261.issue19582@psf.upfronthosting.co.za>
2013-11-14 11:12:35Debarshi.Goswamilinkissue19582 messages
2013-11-14 11:12:35Debarshi.Goswamicreate