summaryrefslogtreecommitdiff
path: root/tools/to_catlfish.py
diff options
context:
space:
mode:
Diffstat (limited to 'tools/to_catlfish.py')
-rwxr-xr-xtools/to_catlfish.py25
1 files changed, 25 insertions, 0 deletions
diff --git a/tools/to_catlfish.py b/tools/to_catlfish.py
new file mode 100755
index 0000000..00a359f
--- /dev/null
+++ b/tools/to_catlfish.py
@@ -0,0 +1,25 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+#
+# Copyright (c) 2015, NORDUnet A/S.
+# See LICENSE for licensing information.
+
+import argparse
+import subprocess
+import sys
+import select
+
+parser = argparse.ArgumentParser(description='')
+parser.add_argument('toerl')
+parser.add_argument('nodedir')
+parser.add_argument('command')
+args = parser.parse_args()
+
+p = subprocess.Popen(
+ [args.toerl, args.nodedir],
+ stdin=subprocess.PIPE)
+p.stdin.write(args.command + ".\n")
+p.stdin.flush()
+select.select([], [], [], 0.5)
+p.stdin.close()
+p.wait()