None
Project description
cleanroom
Install:
pip install cleanroom
Create instance in a new process and proxy all operations:
import os
from cleanroom import create_instance
class Cal:
def __init__(self, base):
self.base = base
def inc(self):
self.base += 1
return self.base
def pid(self):
return os.getpid()
cal = create_instance(Cal, 0)
print('Parent PID: ', os.getpid())
print('Cal PID: ', cal.pid())
print('inc: ', cal.inc())
print('inc: ', cal.inc())
Output:
Parent PID: 22239 Cal PID: 22272 inc: 1 inc: 2
Credits
This package was created with Cookiecutter and the audreyr/cookiecutter-pypackage project template.
History
0.1.0 (2019-05-10)
First release on PyPI.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
cleanroom-0.2.1.tar.gz
(9.7 kB
view hashes)
Built Distribution
Close
Hashes for cleanroom-0.2.1-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1d0e6ac583dc7006b11310865a21aa328e14091f9c3140423e91dfec02b019fa |
|
MD5 | b964ec0dfd6a5d78ba64e7030ca4072a |
|
BLAKE2b-256 | 1b07c41176ce69bdc2be88271c2e157e97e60ce2688f137e5cf6c91bbffa3669 |