Created
July 26, 2013 02:04
-
-
Save EdgeCaseBerg/6085477 to your computer and use it in GitHub Desktop.
Simple xemark serving server. Using the xemark executable from the my xemark repository as a cgi for input. Serves only one file.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from wsgiref.util import setup_testing_defaults | |
from wsgiref.simple_server import make_server | |
import os | |
def callXemark(): | |
return os.popen("./xemark < example.xe").read() | |
def xemarkapp(environ, start_response): | |
status = '200 OK' | |
headers = [('Content-Type', 'text/html')] | |
start_response(status, headers) | |
return [callXemark()] | |
make_server('', 1337, xemarkapp).serve_forever() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment