Re: PIL Open Problem

2011-02-07 Thread Richard Holmes
On Tue, 08 Feb 2011 10:56:52 +1100, Ben Finney wrote: >Richard Holmes writes: > >> Thanks, Ben. It turns out that I imported both Image and Tkinter and >> Tkinter has an Image class that masked the Image class in the Image >> module. I solved the problem by moving the Image code to a separate >>

Re: PIL Open Problem

2011-02-07 Thread Westley Martínez
On Mon, 2011-02-07 at 15:54 -0800, rantingrick wrote: > On Feb 7, 5:35 pm, Richard Holmes wrote: > > > Thanks, Ben. It turns out that I imported both Image and Tkinter and > > Tkinter has an Image class that masked the Image class in the Image > > module. I solved the problem by moving the Image

Re: PIL Open Problem

2011-02-07 Thread Ben Finney
Richard Holmes writes: > Thanks, Ben. It turns out that I imported both Image and Tkinter and > Tkinter has an Image class that masked the Image class in the Image > module. I solved the problem by moving the Image code to a separate > module This is a classic problem known as “namespace clobber

Re: PIL Open Problem

2011-02-07 Thread rantingrick
On Feb 7, 5:35 pm, Richard Holmes wrote: > Thanks, Ben. It turns out that I imported both Image and Tkinter and > Tkinter has an Image class that masked the Image class in the Image > module. I solved the problem by moving the Image code to a separate > module Yes an another great example of why

Re: PIL Open Problem

2011-02-07 Thread Richard Holmes
On Tue, 08 Feb 2011 09:47:32 +1100, Ben Finney wrote: >Richard Holmes writes: > >> I'm trying to create an image for use in Tkinter. If I understand the >> PIL documentation correctly, I first need to import Image, then >> create an instance of the Image class and call 'open' (this according >>

Re: PIL Open Problem

2011-02-07 Thread Ben Finney
Richard Holmes writes: > On Mon, 07 Feb 2011 17:28:45 -0500, Corey Richardson > wrote: > >This is good: > > > >import Image > >im = Image.open(foo) > Uh, thanks, Corey, but that's what I'm doing. See Traceback: Without code, we can't see what you're doing. Please post a minimal working example

Re: PIL Open Problem

2011-02-07 Thread Richard Holmes
On Mon, 07 Feb 2011 17:28:45 -0500, Corey Richardson wrote: >On 02/07/2011 05:27 PM, Richard Holmes wrote: >> I'm trying to create an image for use in Tkinter. If I understand the >> PIL documentation correctly, I first need to import Image, then >> create an instance of the Image class and call

Re: PIL Open Problem

2011-02-07 Thread Ben Finney
Richard Holmes writes: > I'm trying to create an image for use in Tkinter. If I understand the > PIL documentation correctly, I first need to import Image, then > create an instance of the Image class and call 'open' (this according > to the documentation). When I try to do this using the model i

Re: PIL Open Problem

2011-02-07 Thread Corey Richardson
On 02/07/2011 05:27 PM, Richard Holmes wrote: > I'm trying to create an image for use in Tkinter. If I understand the > PIL documentation correctly, I first need to import Image, then > create an instance of the Image class and call 'open' Don't do that. This is wrong: import Image im = Image.Ima

PIL Open Problem

2011-02-07 Thread Richard Holmes
I'm trying to create an image for use in Tkinter. If I understand the PIL documentation correctly, I first need to import Image, then create an instance of the Image class and call 'open' (this according to the documentation). When I try to do this using the model in the documentation, I get: Trac