def app(environ, start_response): data = reversi(environ['QUERY_STRING']) start_response("200 OK", [ ("Content-Type", "text/plain"), ("Content-Length", str(len(data))) ]) return iter([data])
import engine r = engine.reversi("00000000000000000000000000021000000120000000000000000000000000001") if r: print r