ANN: papyros 0.1

George Sakkis george.sakkis at
Mon Jun 11 06:46:59 CEST 2007

I am pleased to announce the first alpha release of Papyros, a
lightweight platform-independent package for parallel processing.
Papyros provides a master-slave model: clients can submit jobs to a
master object which is monitored by one or more slave objects that do
the real work. Two main implementations are provided, one using
multiple threads and one multiple processes in one or more hosts
through Pyro (

Papyros' primary design goal is simplicity: a time consuming loop in a
single-thread single-process program can be replaced with an
equivalent parallel version in a few lines, with minimal boilerplate
code overhead.

To get a copy, visit; also available
from the Cheeseshop at


Sample code
Here's a basic example; for more details go through the README and the
included demo script.

import papyros

class FactorizationJob(papyros.Job):
    '''A job for computing the prime factors of an integer.'''
    def __call__(self, n):
        # <-- find the prime factors here --> #
        return factors

# create a multithreded master with three slave threads
from papyros.multithreaded import MultiThreadedMaster
master = MultiThreadedMaster(3)

# factorize concurrently ten random numbers
import random
for _ in xrange(10):

# fetch each job as soon as it finishes
for job in iter(master.popProcessedJob, None):
    factors = job.result
    print '%d prime factors for %d: %s' % (len(factors), job.args[0],

More information about the Python-list mailing list