Issue 1472566: import module with .dll extension (original) (raw)

Created on 2006-04-18 20:06 by sven_nystrom, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Messages (6)
msg28288 - (view) Author: svenn (sven_nystrom) Date: 2006-04-18 20:06
In previous versions, extension modules with the file extension '.dll' could be imported using a single 'import' statement. In 2.5a1 this seems to have changed - here's an example: >>> import minx # Implemented in a .dll - fails Traceback (most recent call last): File "", line 1, in ImportError: No module named minx >>> import imp # Workaround >>> import os >>> minx = imp.load_dynamic('minx', os.getcwd() + '\\minx.dll') I would really like this to remain the same; if that's not possible, it would be helpful if the change itself and a suggested approach were to be included in the documentation. /Sven
msg28289 - (view) Author: Neal Norwitz (nnorwitz) * (Python committer) Date: 2006-04-19 07:13
Logged In: YES user_id=33168 I believe this was an intentional change in rev 43622. I don't see any doc associated with the change however. I also thought it was mentioned on python-dev. Martin, shouldn't this be documented at least in Misc/NEWS? I couldn't find anything.
msg28290 - (view) Author: Tim Peters (tim.peters) * (Python committer) Date: 2006-04-19 17:16
Logged In: YES user_id=31435 Note that rev 43622 added a comment to dynload_win.c explaining why it was done: """ /* Temporarily disable .dll, to avoid conflicts between sqlite3.dll and the sqlite3 package. If this needs to be reverted for 2.5, some other solution for the naming conflict must be found. """
msg28291 - (view) Author: Martin v. Löwis (loewis) * (Python committer) Date: 2006-04-22 14:26
Logged In: YES user_id=21627 Tim mentions the rationale for the change; the Misc/NEWS entry is now in r45574. svenn, why do you need it to work that way? Could you change your code/application/whatever so that it works with .pyd files instead?
msg28292 - (view) Author: svenn (sven_nystrom) Date: 2006-04-22 16:25
Logged In: YES user_id=1504966 Hi loewis, I', sure the .pyd extension will work fine - my original comment was due to the fact I didn't realise it would work as today if the file extension was changed; I was (wrongly) assuming I would have to use the approach indicated in my example, which seemed a little less intuitive than the simple "import".
msg28293 - (view) Author: Georg Brandl (georg.brandl) * (Python committer) Date: 2006-04-27 13:01
Logged In: YES user_id=849994 Closing as "Won't fix", then.
History
Date User Action Args
2022-04-11 14:56:16 admin set github: 43243
2006-04-18 20:06:01 sven_nystrom create