Re: pyramid.response.Response(app_iter=?)

2011-11-05 Thread jerry
Hi Gael,

Indeed, app_iter does work flawlessly out-of-box with GridOut object.
It was some other elementary mistake I made that is triggering the
exception, my bad.

Jerry

On Nov 4, 12:04 am, Gael Pasgrimaud g...@gawel.org wrote:
 On Thu, Nov 3, 2011 at 4:54 PM, jerry jerryji1...@gmail.com wrote:
  Hi,

  How does pyramid.response.Response use the (app_iter=) object passed
  in?

  I'm interested in the details because it does not work with
  app_iter=MongoDB's gridfs.grid_file.GridOut object (which supports the
  usual read/seek/tell() operations), but I found myself drowning in the
  zope style implementation in Pyramid.

 GridOut also implement 
 __iter__http://api.mongodb.org/python/current/api/gridfs/grid_file.html#gridf...

 So you can use it as this









  Thanks in advance.

  Jerry

  --
  You received this message because you are subscribed to the Google Groups 
  pylons-discuss group.
  To post to this group, send email to pylons-discuss@googlegroups.com.
  To unsubscribe from this group, send email to 
  pylons-discuss+unsubscr...@googlegroups.com.
  For more options, visit this group 
  athttp://groups.google.com/group/pylons-discuss?hl=en.

-- 
You received this message because you are subscribed to the Google Groups 
pylons-discuss group.
To post to this group, send email to pylons-discuss@googlegroups.com.
To unsubscribe from this group, send email to 
pylons-discuss+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/pylons-discuss?hl=en.



Re: pyramid.response.Response(app_iter=?)

2011-11-03 Thread Gael Pasgrimaud
On Thu, Nov 3, 2011 at 4:54 PM, jerry jerryji1...@gmail.com wrote:
 Hi,

 How does pyramid.response.Response use the (app_iter=) object passed
 in?

 I'm interested in the details because it does not work with
 app_iter=MongoDB's gridfs.grid_file.GridOut object (which supports the
 usual read/seek/tell() operations), but I found myself drowning in the
 zope style implementation in Pyramid.

GridOut also implement __iter__
http://api.mongodb.org/python/current/api/gridfs/grid_file.html#gridfs.grid_file.GridOut.__iter__

So you can use it as this


 Thanks in advance.

 Jerry

 --
 You received this message because you are subscribed to the Google Groups 
 pylons-discuss group.
 To post to this group, send email to pylons-discuss@googlegroups.com.
 To unsubscribe from this group, send email to 
 pylons-discuss+unsubscr...@googlegroups.com.
 For more options, visit this group at 
 http://groups.google.com/group/pylons-discuss?hl=en.



-- 
You received this message because you are subscribed to the Google Groups 
pylons-discuss group.
To post to this group, send email to pylons-discuss@googlegroups.com.
To unsubscribe from this group, send email to 
pylons-discuss+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/pylons-discuss?hl=en.