How to make a progress bar!
When you are install a package/software/repo, you may see a progress bar look somewhat like this:
And in this tutorial I will show you how to make a progress bar looks like that!
First, you need to install a package called tqdm to make the progress bar, to install it, you must check if pip is installed or not by type:
If you see a message look like this:
pip is not recognized as an internal or external command, operable program or batch file.
That mean you have not installed pip, you can go to this website to know how to install it on Windows
If you are using Linux, you can type this command to install pip:
sudo <pmn> install python-pip
<pmn> is the package manager name (e.g. apt, dnf,...)
If pip is installed, type this command on your Terminal if you are using Linux:
pip3 install tqdm
With Windows, type:
pip install tqdm
When the package is installed, let's go to the next part
python3(Linux) on CMD/Terminal to run Python
Then you type:
from tqdm import tqdm import time
To import packages
Now, we will make a "for" loop:
for i in tqdm(range(50000)): time.sleep(0.1)
Then, you will see a progress bar look like this:
And THAT's the end of this tutorial, pls upvote it if you like it! :)
Edit: If you want more infomation, you can go to this website