[Tutor] Using graphics

Dave Angel davea at davea.name
Sun May 5 14:18:51 CEST 2013


On 05/05/2013 07:49 AM, Stafford Baines wrote:
> I have just finished Python Programming by Michael Dawson. A wonderful book with downloadable examples. However, after many hours of frustrating attempts I can't get the graphics to work.
>
> I get error messages such as 'no module called python.image'

Error messages are lots more specific than that. You generally should 
include a full traceback, and the matching source code.  In this case, 
presumably you had something like:
    import python.image

in your source code.  No idea why anyone might want to make a package 
called python, but image is the normal name for the optional importable 
module PIL.  (Python Imaging Library)

However, the book probably has instructions for how to get it, and it 
may not be using PIL at all.  If not, then much of the following is wrong.

What version of Python are you running, and what OS?  PIL is available 
prebuilt for Python up to 2.7, in some Windows environments, but 
anywhere else you'll probably have to build it yourself.

>
> I have made sure that the folder
> Livewires iis in the same folder as the program (Falling Pizzas say, but it won't
> work with any of the included graphics games)
>
> The book is written using python 3.1 and I am using python 3.3, could this be a problem?

Probably not.
>
> Any advice would be very much appreciated as I do wish to use graphics facilities.
>
> Thanking any one who can help in advance.
>

For non-standard packages, always start by searching on pypi:

https://pypi.python.org/pypi/PIL
   which leads you to:
http://www.pythonware.com/products/pil/


-- 
DaveA


More information about the Tutor mailing list