I am new to python, I would like to import a folder containing a .py
file and dll
files to another python script.
USB_Relay
__init__.py
USB_relay.dll
test.py
In my other python file, I would like to run a function inside test.py
which needs to use source from the dll file. May I know what is the correct way of importing?
I have tried a few but it didn't work.
#import USB_Relay
#import USB_Relay.test
from USB_Relay import test
test.turnoff1()
test.py
L = ctypes.CDLL( "./USB_relay.dll/" )
def turnoff1():
ret = L.usb_relay_device_close_one_relay_channel(hdev,1)
I will get an error
type object 'L' has no attribute 'usb_relay_device_open_one_relay_channel'