how to make script interact with another script

bruno at modulix onurb at xiludom.gro
Mon Mar 20 14:47:39 EST 2006


Chason Hayes wrote:
> How can I get a script to pipe data to another program, wait for a
> response, then send more data etc.
> 
> For example, from a script, I want to run smbclient then send it the
> username, password, and then some commands. (I know there are better ways
> to achieve this functionality, it is the principle that I am after)
> 

look for subprocess and popen in the standard lib.

-- 
bruno desthuilliers
python -c "print '@'.join(['.'.join([w[::-1] for w in p.split('.')]) for
p in 'onurb at xiludom.gro'.split('@')])"



More information about the Python-list mailing list