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 -- https://mail.python.org/mailman/listinfo/python-announce-list Support the Python Software Foundation: http://www.python.org/psf/donations/