Design problem, call function from HTML?

bart smap at scarlet.be
Mon May 30 05:16:42 EDT 2005


This is the python way i have.

imgref = 'image.py'
out.write('<img src="%s">'
                  % (imgref)


in ASP.NET u can do something like this

<img src="<%# image() %>">

//allready loaded data
data

image(){
  return data.img
}

Is there any remote possibility u can pulloff the same in python? Now
i have to process my data to display page and do it again to generate
my image (execute same code twice).

One solution would be to save the image to harddisk and then load it.
But rather keep it clean as return value.



More information about the Python-list mailing list