pyztk/test.py

14 lines
258 B
Python
Raw Normal View History

2016-05-23 13:50:54 +07:00
# -*- coding: utf-8 -*-
import sys
sys.path.append("zk")
import zk
zk = zk.ZK('192.168.1.201')
2016-05-23 14:41:39 +07:00
status, message = zk.connect()
if status:
print 'Firmware Version: : {}'.format(zk.get_firmware_version())
print zk.disconnect()
else:
print message