Top-rated recipes tagged "filepager"http://code.activestate.com/recipes/tags/filepager/top/2009-04-30T05:20:09-07:00ActiveState Code RecipesHow to use twisted pb FilePager (Python) 2009-04-30T05:20:09-07:00alex lavoro.propiohttp://code.activestate.com/recipes/users/4170029/http://code.activestate.com/recipes/576735-how-to-use-twisted-pb-filepager/ <p style="color: grey"> Python recipe 576735 by <a href="/recipes/users/4170029/">alex lavoro.propio</a> (<a href="/recipes/tags/filepager/">filepager</a>, <a href="/recipes/tags/network/">network</a>, <a href="/recipes/tags/pb/">pb</a>, <a href="/recipes/tags/twisted/">twisted</a>). Revision 3. </p> <p>Banana limits string objects to 640k so sending a large file requires to break it into many small chunks. Twisted provide a helper class to do this: twisted.spread.pb.FilePager. I modified on <a href="http://code.activestate.com/recipes/457670/">recipe 457670</a>: "How to use twisted pb pager" to demonstrate the usage of FilePager. getFile1() is similar to getIt() in <a href="http://code.activestate.com/recipes/457670/">recipe 457670</a>. getFile2() uses the utility function in twisted.spread.pb.util.</p>