Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python.announce > #1154 > unrolled thread
| Started by | Alex Flint <alex.flint@gmail.com> |
|---|---|
| First post | 2013-12-01 23:38 -0500 |
| Last post | 2013-12-01 23:38 -0500 |
| Articles | 1 — 1 participant |
Back to article view | Back to comp.lang.python.announce
process_isolation 0.13 -- per-module process isolation in pure python Alex Flint <alex.flint@gmail.com> - 2013-12-01 23:38 -0500
| From | Alex Flint <alex.flint@gmail.com> |
|---|---|
| Date | 2013-12-01 23:38 -0500 |
| Subject | process_isolation 0.13 -- per-module process isolation in pure python |
| Message-ID | <mailman.3504.1386060123.18130.python-announce-list@python.org> |
Hi all,
I'm happy to announce the release of process_isolation, a library for
running python modules in sub-processes while iteracting with them
like normal modules.
https://github.com/alexflint/process-isolation
What is process_isolation?
==========================
Process isolation creates sub-processes and imports python modules
into them, then provides proxies so that interacting with those
modules looks like interacting with ordinary modules:
from process_isolation import import_isolated
sys = import_isolated('sys')
sys.stdout.write('Hello world\n') # runs in a sub-process
This is particularly useful for testing extension modules because
segfaults and other operating system-level signals can be caught as
ordinary exceptions:
buggy_ext_module = import_isolated('buggy_ext_module')
try:
buggy_ext_module.this_might_segfault()
except ProcessTerminationError as ex:
print 'There be dragons!'
It can also be used to safely run untrusted code, and to solve the
reload problem for extension modules. Process isolation is implemented
in pure python.
All feedback appreciated.
Alex
Back to top | Article view | comp.lang.python.announce
csiph-web