当前位置: 首页>>代码示例>>Python>>正文


Python InterfaceKit.openRemoteIP方法代码示例

本文整理汇总了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>&#169 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')
开发者ID:njligames,项目名称:SBC,代码行数:32,代码来源:WebInterfaceKit.py


注:本文中的Phidgets.Devices.InterfaceKit.openRemoteIP方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。