Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Use python to automate interaction?

Is it possible to use python in order to automate interaction in Linux? (for example, sending "Yes" to StdInput whenever the string "Are you sure?" is sent to StdOutput)

Thanks.

like image 740
iTayb Avatar asked Mar 05 '11 14:03

iTayb


People also ask

Can Python automate website interaction?

The technique of automating the web with Python works great for many tasks, both general and in my field of data science. For example, we could use selenium to automatically download new data files every day (assuming the website doesn't have an API).

Can Python be used for automation?

Python is often used in workplaces to automate and schedule the sending/receiving of emails and texts. Python packages – email, smtplib, are used for sending emails using just Python. You can turn a time-consuming task into an automated/scheduled task.


1 Answers

Yes, take a look at pexpect.

like image 164
unutbu Avatar answered Oct 07 '22 01:10

unutbu