Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
python-csp provides python with communicating sequential processes style parallelism

This branch is even with futurecore:jython

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
benchmark
csp
examples
jythonsetup
scripts
src
test
ChangeLog
Harness.java
Jycspthread.py
LICENSE
README
TestProcess.java

README

python-csp: Communicating Sequential Processes for Python.

Homepage: http://code.google.com/p/python-csp/

Copyright (C) Sarah Mount, 2009 under the GNU GPL v2. See the file
LICENSE for more details.

Installation:
------------

  python-csp can be installed using PIP (PIP Installs Python):

    $ sudo pip install python-csp

  or from a source distribution using setup.py:

    $ sudo python setup.py install


Introduction.
------------

  python-csp adds C.A.R. (Tony) Hoare's Communicating Sequential
  Processes to Python. A brief example:

  >>> @process
  ... def writer(channel, n):
  ...      for i in xrange(n):
  ...              channel.write(i)
  ...      channel.poison()
  ...      return
  ... 
  >>> @process
  ... def reader(channel):
  ...      while True:
  ...              print channel.read()
  ... 
  >>> chan = Channel()
  >>> Par(reader(chan), writer(chan, 5)).start()
  0
  1
  2
  3
  4
  >>>

Documentation.
-------------

  There are several sources of documentation for python-csp:

  * If you are running the python-csp shell, type "info csp" to list
    available in-shell help.  

  * A user guide exists online at:
    http://code.google.com/p/python-csp/wiki/Tutorial

  * tutorial/ contains code from the tutorial pages on the wiki.

  * docs/ contains API documentation generated directly from the
    python-csp source code.

  * examples/ contains some larger example programs.
Something went wrong with that request. Please try again.