Apache Mod-Python - Reopened: (MODPYTHON-15) Publisher : iterable return values should be corretly publish

This is Interesting: Free IT Magazines  
Home > Archive > Apache Mod-Python > December 2005 > Reopened: (MODPYTHON-15) Publisher : iterable return values should be corretly publish





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Reopened: (MODPYTHON-15) Publisher : iterable return values should be corretly publish
Nicolas Lehuen (JIRA)

2005-12-10, 7:45 am

[ http://issues.apache.org/jira/brows...HON-15?page=all ]

Nicolas Lehuen reopened MODPYTHON-15:
-------------------------------------


Reopened to fix MODPYTHON-97.

> Publisher : iterable return values should be corretly published
> ---------------------------------------------------------------
>
> Key: MODPYTHON-15
> URL: http://issues.apache.org/jira/browse/MODPYTHON-15
> Project: mod_python
> Type: Improvement
> Versions: 3.1.3
> Reporter: Nicolas Lehuen
> Assignee: Nicolas Lehuen
> Priority: Minor
> Fix For: 3.2


>
> Suppose this function in a published module :
> def index(req)
> req.content_type = 'text/plain'
> yield '1\n'
> yield '2\n'
> yield '3\n'
> yield '4\n'
> When published, this module should return a text content with '1\n2\n3\n4\n'.
> This could also be useful with a file() object, since they are iterable ; this would provide another way to send a file, only slightly less performing than the send_file() method. Handy when you want to filter a file :
> def filter(req,filename):
> f = open(filename,'r')
> for line in f:
> yield re.sub('foo','bar',line)


Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com