Commits

Jan-Wijbrand Kolman committed 6cd385c

move the server starting code to a separate function to be able
to use at as a poor man's entry point.

Comments (0)

Files changed (1)

corenlp/corenlp.py

     return parse_xml_output(input_folder, corenlp_path, memory, raw_output=raw_output)
 
 
-if __name__ == '__main__':
+def server():
     """
     The code below starts an JSONRPC server
     """
     except KeyboardInterrupt:
         print >>sys.stderr, "Bye."
         exit()
+
+if __name__ == '__main__':
+    server()