processing 0.34
Package for using processes mimicking the `threading` module
Latest Version: 0.52
Package for using processes which mimics the threading module, and allows the sharing of objects between processes.
The processing.Process class follows the API of threading.Thread. For example
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 <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 [9, 8, 7, 6, 5, 4, 3, 2, 1, 0] >>> print repr(l) <Proxy[list] object at 0x00E1B3B0>
After installation you can run the test scripts by doing either
python -m processing.test
on Python 2.5 or
python -c "from processing.test import main; main()"
on Python 2.4. This will run various test scripts using both processes and threads.
See README.txt and doc/index.html in the package directory for more information.
| File | Type | Py Version | Size | # downloads |
|---|---|---|---|---|
| processing-0.34.win32-py2.5.exe (md5) | MS Windows installer | 2.5 | 158KB | 116 |
| processing-0.34.zip (md5) | Source | 134KB | 225 | |
| processing-0.34.win32-py2.4.exe (md5) | MS Windows installer | 2.4 | 155KB | 103 |
- Author: R Oudkerk <r m oudkerk at gmail com>
- Home Page: http://cheeseshop.python.org/pypi/processing
- License: BSD Licence
- Platform: Unix and Windows
- Categories
- Package Index Owner: oudkerk
- DOAP record: processing-0.34.xml
