command = "su %s ; %s " % (user, command)
- p = subprocess.Popen(command, shell=True,
+ p = subprocess.Popen(command,
stdout = subprocess.PIPE,
- stderr = subprocess.PIPE)
- #stdin = stdin)
+ stderr = subprocess.PIPE,
+ stdin = stdin)
out, err = p.communicate()
return (out, err)
command = ["cp"]
if recursive:
command.append("-R")
-
- command.append(src)
- command.append(dst)
-
+
+ if isinstance(dest, str):
+ dest = dest.split(";")
+
+ if isinstance(src, str):
+ src = src.split(";")
+
+ args.extend(src)
+
+ args.extend(dest)
+
p = subprocess.Popen(command,
stdout=subprocess.PIPE,
stderr=subprocess.PIPE)