Updated: (MODPYTHON-15) Publisher : iterable return values
Web Server forum
Back To The Forum Home!Search!Private Messaging System

Web Server Talk Web Server Talk > Web Servers reviews > Apache Server configuration support > Apache Mod-Python > Updated: (MODPYTHON-15) Publisher : iterable return values




  Last Thread   Next Thread Next
  Show Printable Version Email this Page Subscribe to this Thread      Post New Thread    Post A Reply      

    Updated: (MODPYTHON-15) Publisher : iterable return values  
Graham Dumpleton (JIRA)


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
08-13-06 12:12 PM

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

Graham Dumpleton updated MODPYTHON-15:
--------------------------------------

Fix Version/s:     (was: 3.3)

> Publisher : iterable return values should be corretly published
> ---------------------------------------------------------------
>
>                 Key: MODPYTHON-15
>                 URL: http://issues.apache.org/jira/browse/MODPYTHON-15
>             Project: mod_python
>          Issue Type: Improvement
>    Affects Versions: 3.1.3
>            Reporter: Nicolas Lehuen
>         Assigned To: Nicolas Lehuen
>            Priority: Minor
>
> 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)






[ Post a follow-up to this message ]



    Sponsored Links  




 





   All times are GMT. The time now is 04:27 PM.      Post New Thread    Post A Reply      
  Last Thread   Next Thread Next


Most Popular forums 

Forum Jump:
Rate This Thread:

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is OFF
vB code is ON
Smilies are ON
[IMG] code is OFF
 
Medical and Health forum | Computer Games Reviews | Graphics design forum

Back To The Top
Home | Usercp | Faq | Register