Update idsdk.py
Browse files
idsdk.py
CHANGED
@@ -2,6 +2,24 @@ import os
|
|
2 |
|
3 |
from ctypes import *
|
4 |
|
|
|
|
|
|
|
5 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6 |
|
7 |
print("All go through")
|
|
|
2 |
|
3 |
from ctypes import *
|
4 |
|
5 |
+
libPath = os.path.abspath(os.path.dirname(__file__)) + '/libidsdk.so'
|
6 |
+
#libPath = 'libidsdk.so'
|
7 |
+
idsdk = cdll.LoadLibrary(libPath)
|
8 |
|
9 |
+
getMachineCode = idsdk.getMachineCode
|
10 |
+
getMachineCode.argtypes = []
|
11 |
+
getMachineCode.restype = c_char_p
|
12 |
+
|
13 |
+
setActivation = idsdk.setActivation
|
14 |
+
setActivation.argtypes = [c_char_p]
|
15 |
+
setActivation.restype = c_int32
|
16 |
+
|
17 |
+
initSDK = idsdk.initSDK
|
18 |
+
initSDK.argtypes = []
|
19 |
+
initSDK.restype = c_int32
|
20 |
+
|
21 |
+
idcardRecognition = idsdk.idcardRecognition
|
22 |
+
idcardRecognition.argtypes = [c_char_p]
|
23 |
+
idcardRecognition.restype = c_char_p
|
24 |
|
25 |
print("All go through")
|