import images (wxPython)

Peter Hansen peter at engcorp.com
Tue Feb 12 23:49:55 EST 2002


Andrew wrote:
> 
> Hello,
> 
> I was looking at some of the demo code and notice that they do an 'import
> images' in some files to get some predefined images.  Now I'm writing my own
> script and would like to make use of those images as well, but I get the
> following error...  ImportError: No module named images.
> I'm still learning python and am not 100% sure how the import statement
> works.  The images file is in the demo folder of the wxPython folder.  I
> tried things like import wxPython.demo.images, but that doesn't work either.
> Can somebody give me a hand?

It needs to be accessible in a folder in your pythonpath.  But why
not just copy the file to your own folder and use it locally?  The
code in the demo is for demonstration purposes, not to use as a library...



More information about the Python-list mailing list