#
import sys
+import time
import subprocess
from collections import Mapping, Set, Sequence
print(msg_exec)
p = subprocess.Popen(cmd, shell=True, stdout=subprocess.PIPE,
stderr=subprocess.STDOUT)
+
+ # show progress bar
+ seconds = 0
+ while p.poll() is None:
+ seconds += 1
+ if seconds > 3:
+ show_progress_bar(seconds)
+ time.sleep(1)
+
output = p.communicate()
for line in output[0].strip().split('\n'):
line = line.replace('\n', '')
for path, obj in objwalk(obj):
if path == dst_path:
return obj
+
+
+def show_progress_bar(length):
+ max_len = 50
+ length %= max_len
+ sys.stdout.write('Running ' + ' ' * max_len + '\r')
+ sys.stdout.flush()
+ sys.stdout.write('Running ' + '=' * length + '>' + '\r')
+ sys.stdout.flush()