I'm automating a installer using pexpect
, which works nicely. However, I would like to replace the pexpect.interact()
with some sort of stdout
, which would allow me to keep track of the progress bar of the installer:
Please wait while Setup installs on your computer.
Installing
0% ______________ 50% ______________ 100%
#########################################
----------------------------------------------------------------------------
Setup has finished installing on your computer.
View readme file [Y/n]: n
[Errno 5] Input/output error
The source code looks like:
## A bunch of informations being given to the installer above
## Do you want install? y
child.sendline('y')
## now I keep tracking of the installation bar progress ...
child.interact()
## View readme file [Y/n]: n
child.sendline('n')
so the last part is being done manually, become I can't get of the child.interact()
once the install has been completed.
How could I accomplish that?