This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (pypi.python.org).
Help us improve Python packaging - Donate today!

generator_tools enable copying and pickling generators

Project Description
The generator tools package enables copying and pickling running generators in
CPython ( you don't need Stackless Python ).

Usage
-----

from generator_tools.copygenerators import*
from generator_tools.picklegenerators import*

def f(start):
i = start
while i<start+10:
yield i
i+=1

>>> f_gen = f(5)
>>> f_gen.next() # or next(f_gen) in Python 3.0
5
>>> f_gen.next()
6
>>> g_gen = copy_generator(f_gen)
>>> h_gen = copy_generator(f_gen)
>>> g_gen.next()
7
>>> h_gen.next()
7
>>> pickler = GeneratorPickler("test.pkl")
>>> pickler.pickle_generator(g_gen)
>>> k_gen = pickler.unpickle_generator()
>>> list(g_gen) == list(k_gen)
True
Release History

Release History

This version
History Node

0.3.6

History Node

0.3.5

History Node

0.3.4

History Node

0.3.3

History Node

0.3.2

History Node

0.3.1

History Node

0.3

History Node

0.2

History Node

0.1.1

History Node

0.1

Download Files

Download Files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
generator_tools-0.3.6.tar.gz (87.9 kB) Copy SHA256 Checksum SHA256 Source Feb 24, 2009
generator_tools-0.3.6.win32-py2.5.exe (161.3 kB) Copy SHA256 Checksum SHA256 2.5 Windows Installer Feb 24, 2009
generator_tools-0.3.6.win32-py2.6.exe (161.3 kB) Copy SHA256 Checksum SHA256 2.6 Windows Installer Feb 24, 2009
generator_tools-0.3.6.zip (90.3 kB) Copy SHA256 Checksum SHA256 Source Feb 24, 2009

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting