i'm writing a python application that uses a command line utility (propietary so it can't be modified) to do part of its work. The problem is that I have to pass the password as a command line argument to the tool which would easily be seen by any user doing 'ps ax'. How can I send the password to the command line tool safely from within python (or a shell script)?
If the password is only accepted on the command line, you're pretty much out of luck.  Are you absolutely sure there's no option to send the password in another way?  If you can send it over the process's stdin, you can talk to it via a pipe, and send the password securely in that way.
sending password to command line tools