blob: 00a359fab42f39de2a2dcef867f70f262f3ab95a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
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()
|