[Stackless] Pickling example using Sieve of Eratosthenes

Andrew Francis andrewfr_ice at yahoo.com
Mon Nov 2 02:13:28 CET 2009


Andrew:

--- On Sun, 11/1/09, Andrew Dalke <dalke at dalkescientific.com> wrote:

> There are no comments to that regard. The code I got says

I downloaded the code, thinking I uploaded the wrong version.

<block>
In the programme comments, there is the following:

pickled-sieve.py is an implementation of the Sieve of Eratosthenes
with a twist: when Control-C is pressed, all the tasklets (one for each
prime) and associated channels are pickled to a file sieve.dat.

in the future, if pickle-sieve.py is executed with a file name:

$python pickle-sieve.py sieve.dat
</block>

However you somehow missed this while pointing out all these other 'problems'? 

Okay.

Dalke, I am interested in writing a simple complete non-trivial
example illustrating Stackless Python's 'threads too cheap to meter"
style and the power of pickling. I thought a version of the sieve based on Robert Pike' really cool Newsqueak example would the trick nicely. In
doing so I am not interested in writing complex command line options 
that would greatly increase the size of the code. Or showing every little feature of Python.  

Cheers,
Andrew







      




More information about the Stackless mailing list