[Tutor] educational

Ben Finney ben+python at benfinney.id.au
Sun Mar 9 20:56:40 CET 2014


Peter Otten <__peter__ at web.de> writes:

> Ben Finney wrote:
> > And Python is correct, the ‘Image’ type has no ‘open’ attribute. What
> > leads you to think that would work? If there is some article online
> > telling you to use that, it's incorrect; please help us to correct that.
>
> There are a few things around called `Image`. The code the OP is trying to 
> adapt probably uses the Image from the PIL:

Then I'm further confirmed in my view that ‘from tkinter import *’ is
dreadful practice, especially for a system we recommend to newcomers.

If it were::

> import tkinter
> from PIL import ImageTk
> from PIL import Image

then it would be clear which “Image” is being used where.

Now all I need is for the Tkinter-using community to change itself to
fix this confusing practice. I won't hold my breath.

-- 
 \     Rommel: “Don't move, or I'll turn the key on this can of Spam!” |
  `\                               —The Goon Show, _Rommel's Treasure_ |
_o__)                                                                  |
Ben Finney



More information about the Tutor mailing list