log.close() def my_app(environ,start_response): """ app """ start_response('200 OK',[]) return [] class middleware: """ """ def __init__(self,app): self.app = app def __call__(self,environ, start_response): environ['mid.data'] = 'data' def custom_start_response(status, header): return start_response(status, header) response_iter = self.app(environ, custom_start_response) o = '' a = '' response_string = o + ''.join(response_iter) + a return [response_string] prj = 'ConnectedGraph' application = svgapp.svg_app(update.update(graph.graph(collab.collab(middleware(my_app))),prj)) if __name__ == '__main__': import hmac print hmac.new('AA','BLABLA',hashlib.sha1).hexdigest() print hashlib.sha1('BLABLA').hexdigest()
n2,o2 = utest(set_type,'type') def custom_start_response(status, header): return start_response(status, header) response_iter = self.app(environ, custom_start_response) o = '<script %s type="text/ecmascript" xlink:href="/js/tst/test_graph.js"/>\n'%_XLINKNS o += '<g transform="translate(5,20)"><text id=".results" stroke-width="0">' o += add_entry(o1) o += add_entry(o2) o += '</text></g>' a = '' response_string = o + ''.join(response_iter) + a return [response_string] set2 = { 'AA:G':"{'AA': 'AA'}", #'A[label]':"{'A': 'label'}", 'A B':"{'A': 'A', 'B': 'B'}", 'A':"{'A': 'A'}", } def test_json_connectors(): return '%s'%set2 application = svgapp.svg_app(graph.graph(test(my_app))) if __name__ == '__main__': print 'test'