From 42d09fd7bccc176a4b17e3c40225c0fa2ad80119 Mon Sep 17 00:00:00 2001 From: virusdefender Date: Fri, 15 Jan 2016 20:31:36 +0800 Subject: [PATCH] add demo.py --- demo.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 demo.py diff --git a/demo.py b/demo.py new file mode 100644 index 0000000..2769b1f --- /dev/null +++ b/demo.py @@ -0,0 +1,16 @@ +# coding=utf-8 +import os +import judger + + +base_path = os.path.dirname(os.path.abspath(__file__)) + + +print judger.run(path=os.path.join(base_path, "test"), + in_file=os.path.join(base_path, "in"), + out_file=os.path.join(base_path, "out"), + max_cpu_time=2000, + max_memory=200000000, + args=["1", "2", "####"], + env=["LD_PRELOAD=" + os.path.join(base_path, "sandbox.so")]) +