Re: various re-import errors

Zoran Popovic (
Wed, 13 Apr 1994 18:17:19 GMT

In article <> writes:

import foo # where foo is a dynamically loaded module

causes a core dump, at least on systems using SVR4 shared libraries
for dynamic module loading.

- Calling reload() for dynamically loaded modules (case 1) is
forbidden and raises an ImportError

Is there an intrinsic problem that makes reloading dynamic shared
objects hard/impossible to implement? It seems to me that
reloading DSO's is a very usefull feature: no need to
restart python every time a module written in c is recompiled (an
extremely desireable feature when rapidly prototyping code).
Otherwise, one might just as well make all modules built-in to
start with.

If the main problem is that different types of dynamic loaders do
not support multiple loads of the same file, disallowing it across
all platforms is probably not a solution.