[Image-SIG] assigning commands to a variable
francesco.pirotti at unipd.it
Tue Aug 24 17:16:21 CEST 2004
is it possible to assign a string to a variable and then make python
understand that it is not just text but a command?
The actual problem is that I want to use the PIL filters, which are called
filter_type can be a number of different filter types, like for example
"BLUR" or "SMOOTH".
My user chooses the filter type and then I have to put it in the function
a = "BLUR"
but of course that does not work, as "a" is not recognized as a ImageFilter
module and also assigning
a = "ImageFilter.BLUR"
does not work. Is there a trick? (I am obviously not an ace as programmer)
More information about the Image-SIG