Python 调用DLL操作抄表机
时间:2021-01-14 11:15:54|栏目:Python代码|点击: 次
# -*- coding: GBK -*-
from ctypes import *
dll = windll.LoadLibrary('JBA188.dll')
a = dll.test()
print '测试设备连接状态%s' % a
srcName = c_char_p("publish_pd.bin")
decName = c_char_p('d:\\publish_pd.bin')
b = dll.upfile(srcName,decName)
print '将文件上传至计算机%s' % b
pStr = c_char_p()
pStr.value = ''
c = dll.getdatetime(pStr);
print '读取抄表机时间%s' % c
print pSt
from ctypes import *
dll = windll.LoadLibrary('JBA188.dll')
a = dll.test()
print '测试设备连接状态%s' % a
srcName = c_char_p("publish_pd.bin")
decName = c_char_p('d:\\publish_pd.bin')
b = dll.upfile(srcName,decName)
print '将文件上传至计算机%s' % b
pStr = c_char_p()
pStr.value = ''
c = dll.getdatetime(pStr);
print '读取抄表机时间%s' % c
print pSt
上一篇:python验证码识别教程之灰度处理、二值化、降噪与tesserocr识别
栏 目:Python代码
本文标题:Python 调用DLL操作抄表机
本文地址:http://www.codeinn.net/misctech/45243.html