shell interaction 
Author Message
 shell interaction

I am using os.popen to send a command to the shell.
Some shell utilities send back a prompt and wait
for a reply. For example

os.popen('passwd') will cause the shell to ask for the old
password.

How do I send a string to satisfy the prompt?

TIA
dennis godfrey

--
dennis - have gudulka, will travel



Mon, 19 May 2003 03:00:00 GMT  
 shell interaction

Quote:

>I am using os.popen to send a command to the shell.
>Some shell utilities send back a prompt and wait
>for a reply. For example

>os.popen('passwd') will cause the shell to ask for the old
>password.

>How do I send a string to satisfy the prompt?

                        .
                        .
                        .
There are several ways.
<URL:http://sourceforge.net/projects/ExpectPy>
likely will satisfy you best.
--


Business:  http://www.Phaseit.net
Personal:  http://starbase.neosoft.com/~claird/home.html



Tue, 20 May 2003 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. awk-shell interaction

2. UNIX Shell Interaction

3. Interaction with the shell

4. Scheme Shell: Shell Scripting for the 90's

5. Scheme Shell: Shell Scripting for the 90's

6. Scheme Shell: Shell Scripting for the 90's

7. Scheme Shell: Shell Scripting for the 90's

8. c-shell / bourne-shell / tclsh

9. Scheme Shell: Shell Scripting for the 90's

10. Good alternative to j-interaction-mode.el

11. j-interaction-mode for gnu emacs (works with J 3.2)

12. revised GNU emacs J interaction mode

 

 
Powered by phpBB® Forum Software