# HG changeset patch # User Nicholas Jillings # Date 1470130663 -3600 # Node ID 48a84568359c6d4a4caa61dc274273923c52ad79 # Parent c602b4c69310f217da2e512a79b8eadd4dc43d3d# Parent 881d3c71098e086b5e1df01fa6e4cb404038c4bb Merge branch 'master' of https://github.com/BrechtDeMan/WebAudioEvaluationTool diff -r 881d3c71098e -r 48a84568359c python/pythonServer.py --- a/python/pythonServer.py Tue Aug 02 11:35:26 2016 +0200 +++ b/python/pythonServer.py Tue Aug 02 10:37:43 2016 +0100 @@ -28,6 +28,7 @@ PSEUDO_PATH = '../tests/' pseudo_files = [] +pseudo_index = 0 for filename in os.listdir(PSEUDO_PATH): print(filename) if filename.endswith('.xml'): @@ -221,6 +222,7 @@ s.end_headers() def http_do_GET(request): + global pseudo_index if(request.client_address[0] == "127.0.0.1"): if (request.path == "/favicon.ico"): send404(request) @@ -233,7 +235,7 @@ if (request.path == '/'): request.path = '/index.html' elif (request.path == '/pseudo.xml'): - request.path = '/'+PSEUDO_PATH + pseudo_files[pseudo_index] + request.path = PSEUDO_PATH + pseudo_files[pseudo_index] print(request.path) pseudo_index += 1 pseudo_index %= len(pseudo_files)