[Python-Dev] Demo/embed causes 'import site' failure

Guido van Rossum guido@beopen.com
Mon, 10 Jul 2000 12:22:36 -0500

> > OK, so there's code masking the ImportError in import_encodings() in
> > codecs.c.  I disabled that (hmm, maybe this should be disabled
> > automatically when -v is used!).
> Hard to do since the setting of the verbosity flag is not
> available to Python code.

Actually, it is:  see pydebug.h, included by Python.h:

extern DL_IMPORT(int) Py_VerboseFlag;

> >From man ld:
>        -E
>        -export-dynamic
>               When  creating  an ELF file, add all symbols to the
>               dynamic symbol table.  Normally, the dynamic symbol
>               table contains only symbols which are used by a dy­
>               namic object.  This option is needed for some  uses
>               of dlopen.
> (Not sure whether this is what you're looking for, though.)

Thanks -- yes, that did it!

--Guido van Rossum (home page: http://dinsdale.python.org/~guido/)