steve at holdenweb.com
Tue Nov 8 16:47:13 CET 2005
Shi Mu wrote:
> On 11/8/05, Fredrik Lundh <fredrik at pythonware.com> wrote:
>>Shi Mu wrote:
>>>why the following code report the error:
>>>Traceback (most recent call last):
>>> File "C:\Python23\lib\site-packages\Pythonwin\pywin\framework\scriptutils.py",
>>>line 310, in RunScript
>>> exec codeObject in __main__.__dict__
>>> File "C:\Python23\Examples\AppB\text.py", line 24, in ?
>>> text.image_create(END, image=photo)
>>> File "C:\Python23\lib\lib-tk\Tkinter.py", line 2882, in image_create
>>> return self.tk.call(
>>>TclError: image "pyimage4" doesn't exist
>>works for me, when running it from a stock CPython interpreter.
>>have you tried running the script outside the pywin environment?
> yes. I use both cmd and pythonwin to run it. why both of them can not
You'll notice I have moved your reply underneath the posting it replied
to, which is normally the easiest way for readers to follow a thread.
Please try to avoid "top posting".
The reason you can't run Tkinter applications under PythonWin is that
PythonWin does not use a separate process to run the modules you ask it
Since PythonWin used MFC-style windowing, there is a conflict between
the event-handling loops of the two different windowing systems.
Steve Holden +44 150 684 7255 +1 800 494 3119
Holden Web LLC www.holdenweb.com
PyCon TX 2006 www.python.org/pycon/
More information about the Python-list