I am working on a simple GUI Python script to perform some simple tasks on the system. Some of these works include apt-get install to install some packages.
While this is happening, I want to display a progress bar, which should be updated with the download progress using the small percentage shown in the apt-get interface in the terminal.
BUT! I cannot find a way to get progress information. Piping or redirecting the output of apt-get simply gives static lines that show the message “completed download” for each package, as well as for reading through subprocess.Popen() in my script.
How can I read from the apt-get output to get the percentages of the downloaded file?
python subprocess popen progress-bar apt-get
Grant paul
source share