Welcome, guest | Sign In | My Account | Store | Cart

Notice! PyPM is being replaced with the ActiveState Platform, which enhances PyPM’s build and deploy capabilities. Create your free Platform account to download ActivePython or customize Python with the packages you require and get automatic updates.

Download
ActivePython
INSTALL>
pypm install processing

How to install processing

  1. Download and install ActivePython
  2. Open Command Prompt
  3. Type pypm install processing
 Python 2.7Python 3.2Python 3.3
Windows (32-bit)
0.52 Available View build log
Windows (64-bit)
0.52 Available View build log
Mac OS X (10.5+)
0.52 Available View build log
Linux (32-bit)
0.52 Available View build log
Linux (64-bit)
0.52 Available View build log
 
Author
License
BSD Licence
Lastest release
version 0.52 on Jan 5th, 2011

processing is a package for the Python language which supports the spawning of processes using the API of the standard library's threading module. It runs on both Unix and Windows.

Features:

  • Objects can be transferred between processes using pipes or

System Message: WARNING/2 (<string>, line 8)

Bullet list ends without a blank line; unexpected unindent.

multi-producer/multi-consumer queues.

  • Objects can be shared between processes using a server process or

System Message: WARNING/2 (<string>, line 11)

Bullet list ends without a blank line; unexpected unindent.

(for simple data) shared memory.

  • Equivalents of all the synchronization primitives in threading

System Message: WARNING/2 (<string>, line 14)

Bullet list ends without a blank line; unexpected unindent.

are available.

  • A Pool class makes it easy to submit tasks to a pool of worker

System Message: WARNING/2 (<string>, line 17)

Bullet list ends without a blank line; unexpected unindent.

processes.

Examples

The processing.Process class follows the API of threading.Thread. For example

System Message: WARNING/2 (<string>, line 45)

Literal block expected; none found.

from processing import Process, Queue

def f(q): q.put('hello world')

if __name__ == '__main__': q = Queue() p = Process(target=f, args=[q]) p.start() print q.get() p.join()

Synchronization primitives like locks, semaphores and conditions are available, for example

>>> from processing import Condition
>>> c = Condition()
>>> print c

System Message: ERROR/3 (<string>, line 63)

Inconsistent literal block quoting.

<Condition(<RLock(None, 0)>), 0> >>> c.acquire() True >>> print c <Condition(<RLock(MainProcess, 1)>), 0>

One can also use a manager to create shared objects either in shared memory or in a server process, for example

>>> from processing import Manager
>>> manager = Manager()
>>> l = manager.list(range(10))
>>> l.reverse()
>>> print l

System Message: ERROR/3 (<string>, line 77)

Inconsistent literal block quoting.

[9, 8, 7, 6, 5, 4, 3, 2, 1, 0] >>> print repr(l) <Proxy[list] object at 0x00E1B3B0>

Tasks can be offloaded to a pool of worker processes in various ways, for example

>>> from processing import Pool
>>> def f(x): return x*x

System Message: ERROR/3 (<string>, line 86)

Inconsistent literal block quoting.

... >>> p = Pool(4) >>> result = p.mapAsync(f, range(10)) >>> print result.get(timeout=1) [0, 1, 4, 9, 16, 25, 36, 49, 64, 81]

Subscribe to package updates

Last updated Jan 5th, 2011

Download Stats

Last month:1

What does the lock icon mean?

Builds marked with a lock icon are only available via PyPM to users with a current ActivePython Business Edition subscription.

Need custom builds or support?

ActivePython Enterprise Edition guarantees priority access to technical support, indemnification, expert consulting and quality-assured language builds.

Plan on re-distributing ActivePython?

Get re-distribution rights and eliminate legal risks with ActivePython OEM Edition.