hi, can anyone confirm PIH capabilities. source: http://karrigell.sourceforge.net/en/pythoninsidehtml.htm
cant get it work with classes nor functions. HTML code doesnt work inside block.
----------[ works ]-------------
image of indent: http://i32.tinypic.com/2v3fqkz.jpg
<% import zigbee %>
<% import sys %>
<% from socket import * %>
<% import struct %>
start
<% print "hello discovery" %>
<% refresh = True %>
<% node_list = zigbee.getnodelist(refresh) %>
<% netw = [] %>
<% for node in node_list: %>
<% if node.type != "coordinator": %>
<% n = { 'nm':node.label, 'add':node.addr_extended, 'st':1, 'er':0} %>
<% try: %>
<% print "(zb) ", netw.index(n) %>
<% except Exception, ex: %>
<% netw.append( n) %>
<% print "------------------" %>
end
------[ doesnt work ]-----------
image of indent: http://i25.tinypic.com/2h4xsi0.jpg
<% import zigbee %>
<% import sys %>
<% from socket import * %>
<% import struct %>
start
<% def discovery(): %>
<% print “hello discovery” %>
<% refresh = True %>
<% node_list = zigbee.getnodelist(refresh) %>
<% netw = [] %>
<% for node in node_list: %>
<% if node.type != “coordinator”: %>
<% n = { ‘nm’:node.label, ‘add’:node.addr_extended, ‘st’:1, ‘er’:0} %>
<% try: %>
<% print "(zb) ", netw.index(n) %>
<% except Exception, ex: %>
<% netw.append( n) %>
<% print “------------------” %>
<% return netw %>
<% net = discovery() %>
end
--------------------------------
Traceback (most recent call last):
File “”, line 7, in http_handler
File “”, line 22, in ?
File “”, line 11, in discovery
NameError: global name ‘zigbee’ is not defined
----------------------------------
- can anyone give support on PIH?
- has anyone got their own version of Karrigell?
- does PIH really support classes and functions?
- any alternatives of Python server that would work with Digi X4?
thank you in advance,
Simon