summaryrefslogtreecommitdiff
path: root/oso.py
diff options
context:
space:
mode:
Diffstat (limited to 'oso.py')
-rw-r--r--oso.py24
1 files changed, 19 insertions, 5 deletions
diff --git a/oso.py b/oso.py
index a57f8fc..2aaee76 100644
--- a/oso.py
+++ b/oso.py
@@ -1,13 +1,27 @@
+import os
+
+
def start_server(ctx):
- pass
+ # Declare Subplot library names. In the generated Python program, the
+ # libraries will be included and can just be used via names, but to placate
+ # automated checks that only see this file, get the names from globals() at
+ # runtime.
+ daemon_start_on_port = globals()["daemon_start_on_port"]
+ runcmd_helper_srcdir_path = globals()["runcmd_helper_srcdir_path"]
+ srcdir = globals()["srcdir"]
+ # This installs srcdir in $PATH so that we can run the client and server
+ # easily.
+ runcmd_helper_srcdir_path(ctx)
-def stop_server(ctx):
- pass
+ # Start server.
+ server = os.path.join(srcdir, "server.py")
+ daemon_start_on_port(ctx, path=server, args="", name="server", port=5000)
-def run_client(ctx, items=None):
- pass
+def stop_server(ctx):
+ daemon_stop = globals()["daemon_stop"]
+ daemon_stop(ctx, name="server")
def answer_is(ctx, index):