[Tutor] Configuration?
Sison, Nick
nsis5@allstate.com
Thu Mar 27 10:08:01 2003
Hello! I just re-installed Python 2.2.2 and applied the Win32all-152
package on my Windows 2000 desktop (SP3). I was wondering if somebody can
point out my error in configuring Python. Thanks!
My system environment variables are:
PATH = %path%;c:\python22
PYTHONPATH = c:\python22\lib; c:\python22\lib\lib-tk
TCL_LIBRARY = c:\python22\tcl\tcl8.3
TK_LIBRARY = c:\python22\tcl\tk8.3
When running the GUI test session I get this right after I hit the exit
button then python dies:
When using IDLE I get this:
Python 2.2.2 (#37, Oct 14 2002, 17:02:34) [MSC 32 bit (Intel)] on win32
Type "copyright", "credits" or "license" for more information.
IDLE 0.8 -- press F1 for help
>>> from Tkinter import *
>>> w = Button(text="Hello", command='exit')
>>> w.pack()
>>> w.mainloop()
Traceback (most recent call last):
File "<pyshell#3>", line 1, in ?
w.mainloop()
File "c:\python22\lib\lib-tk\Tkinter.py", line 937, in mainloop
self.tk.mainloop(n)
File "c:\python22\lib\lib-tk\Tkinter.py", line 157, in _exit
raise SystemExit, code
SystemExit: 0
>>>
When using PythonWin I get this:
PythonWin 2.2.2 (#37, Oct 14 2002, 17:02:34) [MSC 32 bit (Intel)] on win32.
Portions Copyright 1994-2001 Mark Hammond (mhammond@skippinet.com.au) - see
'Help/About PythonWin' for further copyright information.
>>> from Tkinter import *
>>> w = Button(text="Hello", command='exit')
>>> w.pack()
>>> w.mainloop()
Firing event 'ProcessEnter' failed.
Traceback (most recent call last):
File
"C:\Python22\lib\site-packages\Pythonwin\pywin\scintilla\bindings.py", line
141, in fire
rc = apply(binding.handler, args)
File
"C:\Python22\lib\site-packages\Pythonwin\pywin\framework\interact.py", line
471, in ProcessEnterEvent
if self.interp.runsource(source, "<interactive input>"): # Need more
input!
File "c:\python22\lib\code.py", line 87, in runsource
self.runcode(code)
File
"C:\Python22\lib\site-packages\Pythonwin\pywin\framework\interact.py", line
257, in runcode
exec code in self.globals, self.locals
File "<interactive input>", line 1, in ?
File "c:\python22\lib\lib-tk\Tkinter.py", line 937, in mainloop
self.tk.mainloop(n)
File "c:\python22\lib\lib-tk\Tkinter.py", line 157, in _exit
raise SystemExit, code
SystemExit: 0