Re: [Zope] About publishing image files in python product
27 Apr
2001
27 Apr
'01
6:14 p.m.
Dirksen writes:
I'm writing a python product, which will publish a lot of image files as class attributes. 2 problems arose:
1. All image files have to be manually declared as class attributes in the python class file, which is a tedius job.
You can do that programmatically: class C...: ... for image in (<your list of image names; of cause you need to name them>): setattr(C,image,ImageFile('img/%s' % image, globals())) This will get rid of your second problem, too: dot's in names. Dieter
9109
Age (days ago)
9109
Last active (days ago)
0 comments
1 participants
participants (1)
-
Dieter Maurer