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())
|
2016-05-23 14:56:33 +07:00
|
|
|
zk.restart()
|
2016-05-23 14:41:39 +07:00
|
|
|
print zk.disconnect()
|
|
|
|
else:
|
|
|
|
print message
|