Would this work?
dirname = os.path.dirname(sys.argv[0]) dll = ctypes.windll.LoadLibrary(dirname+"\\my.dll")
ctypes.windll.LoadLibrary(r'c:\absolute\path\to\my.dll')
import sys, os.path scriptName = sys.argv[0] pathName = os.path.dirname(scriptName) dllFile = "mydll.dll" locatedAt = (pathName + "/" + dllFile).replace("\\","/") print "script name", scriptName print "path to script", pathName print "dll location", locatedAt
Los miembros registrados pueden publicar, seguir actualizaciones y más. ¿Nuevo aquí? Regístrate gratis.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.