Skip to main content

Package for using processes mimicking the `threading` module

Project description

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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

processing-0.32.zip (121.9 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

processing-0.32.win32-py2.5.exe (150.1 kB view details)

Uploaded Source

processing-0.32.win32-py2.4.exe (147.1 kB view details)

Uploaded Source

File details

Details for the file processing-0.32.zip.

File metadata

  • Download URL: processing-0.32.zip
  • Upload date:
  • Size: 121.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for processing-0.32.zip
Algorithm Hash digest
SHA256 522306186f1e4eea26bda89e47741ae4b14beb6c59e6a616eae848809df0e6d1
MD5 1887aeae0163e60939d03d326f25e4da
BLAKE2b-256 49ecb07ce8cecb2859855e67b9797a0708a9984fc603e3e526ca55dc1482c8ee

See more details on using hashes here.

File details

Details for the file processing-0.32.win32-py2.5.exe.

File metadata

File hashes

Hashes for processing-0.32.win32-py2.5.exe
Algorithm Hash digest
SHA256 95d9a65266111a98fc6d607dc701dbf0767fe8c0f04b6916ffd5f784e426e548
MD5 fbc8f8c3900bff84f0e12bb7a752665d
BLAKE2b-256 2f10d7dd73bb866010ded22e78ab11132e0df56ab0c4ee9c225aad0853f539fd

See more details on using hashes here.

File details

Details for the file processing-0.32.win32-py2.4.exe.

File metadata

File hashes

Hashes for processing-0.32.win32-py2.4.exe
Algorithm Hash digest
SHA256 34e3370c7861ff3e6c3aa9c05d0144e701912eb2c6bcf364f113cf8f72a1b865
MD5 780bf4702dae910f81de9b42ff80e6e6
BLAKE2b-256 e2c2a286479d87f08dbaccfa4685e04acab44c3c3039af9eb6db27c7eb7007b2

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page