how to make script interact with another script

C

Chason Hayes

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)
 
B

bruno at modulix

Chason said:
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.
 
M

Méta-MCI

Hi!

Few ways :

- use TCP/IP server+client (this can also run via a LAN or Internet)
- use mmap (this can run Python<=>Python, Python<=>Ruby, etc.)
- use a file (and win persistance)
- use telepathy (Oups! Sorry, the module is not published yet)
- etc.


MCI
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,230
Members
46,816
Latest member
SapanaCarpetStudio

Latest Threads

Top