Can not use jTkinter
XiaoQin Xia
XQ.Xia at ccsr.cam.ac.uk
Wed Jul 11 07:16:00 EDT 2001
Hi everybody,
The JPython1.1 was installed in c:\winnt\java\JPython-1.1, a copy is in
c:\winnt\java\JPython11
according to guidance, modification was made in c:\winnt\java\JPython11:
1. The replacement jpython.jar must be copied to the JPython directory.
-- in c:\winnt\java\jpython11
2. The jTkinter.jar must be placed somehere on your classpath.
-- copies of jpython.jar can be found in c:\winnt\java\classes;
c:\winnt\java\jpython11; c:\winnt\java\jpython11\lib
3. The tcl82.dll, tk82.dll and tkinter.dll must be placed somewhere on
your
path.
-- in c:\winnt\java\jpython\lib
4. The Lib\_tkinter.py, Lib\code.py, Lib\imp.py and Lib\javaos.py must
be
copied to the JPython Lib directory.
-- in c:\winnt\java\jpython\lib
5. The folders Lib\tcl8.2, Lib\tk8.2 and Lib\lib-tk directories must be
copied to the JPython Lib directory.
-- in c:\winnt\java\jpython\lib
6. The full path to lib-tk must be added to python.path in JPython's
registry. Remember to use double backslashes in the windows path,
e.g:
c:\\java\\jpython-1.1\\lib\\lib-tk
-- done after enter JPython.
But I still got the following error information:
C:\WINNT\java\JPYTHO~1>jpython
JPython 1.1+jTkinter on java1.1.4 (JIT: null)
Copyright (C) 1997-1999 Corporation for National Research Initiatives
>>> import sys
>>> sys.path.append("c:\\winnt\\java\\jpython11\\lib\\lib-tk")
>>> import Tkinter
Traceback (innermost last):
File "<console>", line 1, in ?
File "D:\java\jpython\jTkinter\lib-tk\Tkinter.py", line 8, in ?
File "C:\WINNT\java\JPython11\Lib\_tkinter.py", line 4, in ?
ImportError: no module named jTkinter
>>> import Tkinter
>>> dir(Tkinter)
['__file__', '__name__', '__version__', 'sys']
>>> r=3DTkinter.Tk()
Traceback (innermost last):
File "<console>", line 1, in ?
AttributeError: module 'Tkinter' has no attribute 'Tk'
>>>
Cheers,
Xiao-Qin Xia
More information about the Python-list
mailing list