Merge "Provide API for allowing full stack emulation"
[osm/vim-emu.git] / src / emuvim / api / util / process_utils.py
diff --git a/src/emuvim/api/util/process_utils.py b/src/emuvim/api/util/process_utils.py
new file mode 100644 (file)
index 0000000..1f90716
--- /dev/null
@@ -0,0 +1,9 @@
+import logging
+import subprocess
+import time
+
+
+def wait_until(cmd):
+    logging.debug('waiting for %s\n' % cmd)
+    while subprocess.call(cmd, shell=True) != 0:
+        time.sleep(1)