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

M.-A. Lemburg mal@lemburg.com
Mon, 10 Jul 2000 19:32:31 +0200


Guido van Rossum wrote:
> 
> > > 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;

Yes... I meant: it is not available from Python. (mx.Tools
publishes an interface to this flag: sys.verbosity() which
also allows setting the value at runtime.)
 
-- 
Marc-Andre Lemburg
______________________________________________________________________
Business:                                      http://www.lemburg.com/
Python Pages:                           http://www.lemburg.com/python/