Python 2.0 naive question

David Bolen db3l at fitlinxx.com
Wed Sep 27 07:54:12 CEST 2000


Martin von Loewis <loewis at informatik.hu-berlin.de> writes:

> The idea is not to check whether the imported module looks good, but
> whether loading it results in loading python15.dll.

I noticed some comments mentioning a concern (which, I'll grant, are
probably technically valid) with this approach in terms of an
application that might manually load two versions of Python.  So I
figured I'd take a shot at addressing that.

I submitted a patch that reads the import table in any newly loaded
module to determine which python DLL it was importing directly (as
opposed to just existing in the process) and comparing it to the
version of Python that was doing the importing.  If it fails to match
an ImportError is raised where the error message identifies the
conflicting DLL, as in:

    ImportError: Module use of python15.dll conflicts
                 with this version of Python.

Figured it couldn't hurt to try:

http://sourceforge.net/patch/?func=detailpatch&patch_id=101676&group_id=5470


--
-- David
-- 
/-----------------------------------------------------------------------\
 \               David Bolen            \   E-mail: db3l at fitlinxx.com  /
  |             FitLinxx, Inc.            \  Phone: (203) 708-5192    |
 /  860 Canal Street, Stamford, CT  06902   \  Fax: (203) 316-5150     \
\-----------------------------------------------------------------------/



More information about the Python-list mailing list