I did not find a direct answer to this question, so, asking it in this forum. My question is this - I am using python 2.6.6 version, and using subprocess.popen command to call into a script with some arguments. Some of the arguments are passwords. When I directly use this:
args = shlex.split(cmd)
f = open("a.txt", "a+");
proc = subprocess.Popen(args, stderr=f, stdout=f)
proc.communicate()
retcode = proc.returncode
The command gets executed fine, but I see that ps -ef shows the passwords in clear text. Is there a way to handle this in subprocess api? I have multiple passwords to be passed.
Thanks!