Skip to content

Commit

Permalink
Modify the python example to use the dll when on windows.
Browse files Browse the repository at this point in the history
  • Loading branch information
lsgunth committed Nov 16, 2017
1 parent 13392df commit 5a8a3c6
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion examples/temp_lib.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,10 @@
import struct
import ctypes as c

swlib = c.cdll.LoadLibrary("libswitchtec.so")
if os.name == 'nt':
swlib = c.cdll.LoadLibrary("libswitchtec.so")
else:
swlib = c.cdll.LoadLibrary("switchtec.dll")

swlib.switchtec_open.argtypes = [c.c_char_p]
swlib.switchtec_open.restype = c.c_void_p
Expand Down

0 comments on commit 5a8a3c6

Please sign in to comment.