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
Aangemelde leden kunnen berichten plaatsen, updates volgen en meer. Nieuw hier? Registreer een gratis account.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.