本文整理汇总了Python中Phidgets.Devices.InterfaceKit.openRemoteIP方法的典型用法代码示例。如果您正苦于以下问题:Python InterfaceKit.openRemoteIP方法的具体用法?Python InterfaceKit.openRemoteIP怎么用?Python InterfaceKit.openRemoteIP使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Phidgets.Devices.InterfaceKit
的用法示例。
在下文中一共展示了InterfaceKit.openRemoteIP方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: print
# 需要导入模块: from Phidgets.Devices import InterfaceKit [as 别名]
# 或者: from Phidgets.Devices.InterfaceKit import openRemoteIP [as 别名]
# Print the HTML header
print("Content-type: text/html\n\n")
print("<html><title>FULL INTERFACE KIT</title><body>\n")
print('<center><b><font size="16" color="#0000ff">FULL INTERFACEKIT</font></b></center><br>')
print('<font size="4">THIS PROJECT WILL DEVELOP IN A FULL FUNCTIONAL WEB APPLICATION TO CONTROL THE PHIDGETS SBC</font>')
print('<br>© J J Slabbert')
print('<br><a href="mailto:[email protected]">[email protected]</a><br><br>')
# Create, Open, and Attach the Interface Kit
try:
ifk = InterfaceKit()
except RuntimeError as e:
errors = errors + "<h5>Runtime Exception on object creation: " + e.details + "</h5>\n"
try:
ifk.openRemoteIP('192.168.10.106',5001)
except PhidgetException as e:
errors = errors + "<h5>Phidget Exception on Open: " + e.details + "</h5>\n"
try:
ifk.waitForAttach(10000)
except PhidgetException as e:
errors = errors + "<h5>Phidget Exception on Attach: " + e.details + "</h5>\n"
errors = errors + "<h5>If Phidget is 'Not Physically Attached' it may be in use</h5>\n"
print('<table><tr><td>')
# Generating the Sensor Value Table
print('<b>Analog Sensor Values</b>')
print('<table border="1"><tr><td>Sensor Number</td><td>Sensor Value</td></tr>\n')