Joshua Ginsberg
listspam at flowtheory.net
Tue May 31 10:35:57 EDT 2005
If you're using the Session module, you may want to consider if using Session.unlock() will be useful -- it will clear the server lock for that session. -jag -------------- next part -------------- A non-text attachment was scrubbed... Name: unknown.jpg Type: image/jpeg Size: 1984 bytes Desc: not available Url : http://mm_cfg_has_not_been_edited_to_set_host_domains/pipermail/mod_python/attachments/20050531/50a92fb6/unknown.jpg -------------- next part -------------- Joshua Ginsberg -- joshg at brainstorminternet.net Brainstorm Internet Network Operations 970-247-1442 x131 On May 30, 2005, at 4:31 PM, Nicolas Lehuen wrote: > Hi Berry, > > First check whether this is really due to the way you call your page. > Don't parse the page, just call urllib2.urlopen and see what happens. > > Regards, > Nicolas > > 2005/5/30, berry groenendijk <berry.groenendijk at gmail.com>: >> Hi! >> >> Strictly speaking this is not a mod_python question. Please accept my >> apologies. Still I hope somebody can give me some hints. >> >> I am using mod_python 3.1.3 with mod_python servlets. I am >> experimenting >> with a REST-style interface to my website. >> >> This is the situation. Page A in my website returns a RSS XML file. >> I want >> to use this output on page B in the same website. To present page B >> to the >> user I do a little server side conversion to HTML. The problem is: >> this is >> very slow! My guess is that it has to do with the way I call page A. >> >> Here is part of the code of page B: >> >> >> import os >> import urllib >> from cElementTree import iterparse >> >> import _SitePage as sitepage >> import _Config as config >> >> class keywordshtml2(sitepage.SitePage): >> >> def write_content(self): >> >> url_keywords = "http://%s/keywords" % self.req.hostname >> >> self.writeln('<h1>List of articles by keyword</h1>') >> self.writeln("<p>Available keywords:") >> for event, elem in iterparse(urllib.urlopen(url_keywords)): >> if elem.tag == "item": >> self.writeln("<a href='#%(x)s'>%(x)s</a>, " % ({'x': >> elem.findtext("title")})) >> elem.clear() >> self.writeln("</p>") >> >> Is there a better way to call page A from within page B? >> >> -- >> Berry Groenendijk >> http://www.bersie.de >> >> _______________________________________________ >> Mod_python mailing list >> Mod_python at modpython.org >> http://mailman.modpython.org/mailman/listinfo/mod_python >> >> >> > > _______________________________________________ > Mod_python mailing list > Mod_python at modpython.org > http://mailman.modpython.org/mailman/listinfo/mod_python >
|