diff options
Diffstat (limited to 'python/vyos/util.py')
-rw-r--r-- | python/vyos/util.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/python/vyos/util.py b/python/vyos/util.py index 3970b8bf1..5807c837d 100644 --- a/python/vyos/util.py +++ b/python/vyos/util.py @@ -17,6 +17,14 @@ import os import re import sys + +def subprocess_cmd(command): + """ execute arbitrary command via Popen """ + from subprocess import Popen, PIPE + p = Popen(command, stdout=PIPE, shell=True) + p.communicate() + + def read_file(path): """ Read a file to string """ with open(path, 'r') as f: |