Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python.announce > #1154 > unrolled thread

process_isolation 0.13 -- per-module process isolation in pure python

Started byAlex Flint <alex.flint@gmail.com>
First post2013-12-01 23:38 -0500
Last post2013-12-01 23:38 -0500
Articles 1 — 1 participant

Back to article view | Back to comp.lang.python.announce


Contents

  process_isolation 0.13 -- per-module process isolation in pure python Alex Flint <alex.flint@gmail.com> - 2013-12-01 23:38 -0500

#1154 — process_isolation 0.13 -- per-module process isolation in pure python

FromAlex Flint <alex.flint@gmail.com>
Date2013-12-01 23:38 -0500
Subjectprocess_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

[toc] | [standalone]


Back to top | Article view | comp.lang.python.announce


csiph-web