mirror of
https://notabug.org/scuti/lib3ddevil1
synced 2024-11-22 22:03:00 +05:30
19 lines
583 B
Python
19 lines
583 B
Python
import ctypes, os, sys
|
|
|
|
def loadlibc():
|
|
sharedlib = './lib3ddevil1.so'
|
|
libc = None
|
|
os.environ['PATH'] = os.path.abspath(
|
|
os.path.join(
|
|
os.path.dirname(__file__), "../")) \
|
|
+ ';' \
|
|
+ os.environ['PATH']
|
|
try:
|
|
libc = ctypes.cdll.LoadLibrary(sharedlib)
|
|
except OSError as e:
|
|
print("Error loading dynamically linked library.\nOSError: " + str(e))
|
|
raise SystemExit("Couldn't load %s" % sharedlib)
|
|
return libc
|
|
|
|
libc = loadlibc()
|