How to Import dll inside other directory

Alan Pong alanpong at hkstar.com
Thu Apr 17 23:06:39 EDT 2003


a C extension dll (myext1.dll) compiled by vc++ and placed in c:\

run python 2.3.exe under c:\ in dos prompt, 
>>from myext1 import *
ok

then, move the dll to c:\temp, run python 2.3.exe again under c:\,
>>from temp.myext1 import * (according to the help doc.)
error:
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
ImportError: No module named temp.myext1

Does anybody know how to import dll inside other directory?
Thanks.
Rgds.
Alan




More information about the Python-list mailing list