If you have the Pywin32 extensions installed, you can use the
win32console module to send keystrokes directly to a command
prompt via WriteConsoleInput.

        Roger

<[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED]
>
> I'm working on a scirpt to be used on a windows machine and I need to
> automate a user's input on the command prompt.  For example I'm using
> os.system('mycommand') to excute the commands I want.  However some of
> these command will prompt for a confirmation of yes or no from user.
> Is there anything in python that will allow my script to automate these
> input
> Another example is let  say if i type "format c:\" on the command
> prompt it will warn me and ask me to type 'y' to continue.  I can use
> the os.system to automate the "format c:\" but is there a way to
> automate the 'y' input part.  I try searching for help on the Interent
> but cant seem find any info on how to do this with Python.  Can someone
> give me some confirmation if what I want to do is possible or not.
> Thanks in advance for any help.
> 


-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to