On Sat, May 16, 2009 at 3:43 PM, Stefan Behnel <[email protected]> wrote: > > Dag Sverre Seljebotn wrote: >> Robert wrote: >>> Robert wrote: >>>> this and more related cleanup, speedup of importer, --inplace >>>> --verbose reload() .. here now: >>>> >>>> http://trac.cython.org/cython_trac/ticket/312 >>>> >>> maybe sb likes to test it further: >>> >>> * support for dynamic "reload(<pyxmodule>)" added: e.g change of >>> the Cython code without stopping & relaunching a big app. >>> <so_path>.reloadNN files may arise, as previously loaded files are >>> blocked. >> >> This is great; I've always wanted reload to work... > > Reloading a C module is a very unsafe thing. It basically requires > supporting PEP 3121 in Py3 and won't work in Py2 in most cases. You risk > all sorts of memory leaks and unexpected behaviour. >
However, if things are carefully coded and module cleanup is generated, reloading could work in Py2. Not sure if this would be equivalent to reloading, but see http://code.google.com/p/mpi4py/source/browse/trunk/demo/embedding/helloworld.c . There you have some code using mpi4py between calls to Py_Initialize()/Py_Finalize(). -- Lisandro Dalcín --------------- Centro Internacional de Métodos Computacionales en Ingeniería (CIMEC) Instituto de Desarrollo Tecnológico para la Industria Química (INTEC) Consejo Nacional de Investigaciones Científicas y Técnicas (CONICET) PTLC - Güemes 3450, (3000) Santa Fe, Argentina Tel/Fax: +54-(0)342-451.1594 _______________________________________________ Cython-dev mailing list [email protected] http://codespeak.net/mailman/listinfo/cython-dev
