Design problem, call function from HTML?
Available news archives: comp.lang.tcl - comp.lang.python - comp.security.firewalls - sci.crypt - comp.lang.php - comp.lang.javascript
Google
 
Web news.hping.org


comp.lang.python archive

Design problem, call function from HTML?

From: bart <smap@scarlet.be>
Date: Mon May 30 2005 - 11:16:42 CEST

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.
Received on Thu Sep 29 16:16:14 2005