5 More Useful Scripts in Python — 3

5 More Useful Scripts in Python — 3


Published at - Dec 13, 2021

Hello developers, This post is a continuation of the Python post. I am here with another 5 useful Python scripts or mini-projects. I have published part 1 and part 2 of this post earlier, I will provide the link to that article below.

Python scripts 1–5

5 Most Useful Scripts in Python

Python scripts 6–10

5 More Useful Scripts in Python

· 11. Get the IP address and hostname of a website
·
12. Terminal progress bar
·
13. Wifi password ejector
·
14. Snapshot of the given website
·
15. Split files into chunks

11. Get the IP address and hostname of a website

This script will be used to fetch the IP address and hostname of any website.

Python Script

https://medium.com/media/4e20413f9b024ba74724e2ab8e4d1051/href

Executing the Script

python3 Hostname_IPaddress.py

12. Terminal progress bar

Here I just take the example of image resizing for displaying the progress bar. when we convert lots of images at a time we can use the progress bar to show how many images are resized.

Installation

  • Library to show the progress bar
pip install tqdm
  • Library to resize the images
pip install Pillow

Python Script

https://medium.com/media/3afd3c81b784d6e9b8f156147bdb539e/href

Executing the Script

python3 terminal_progress_bar.py

13. Wifi password ejector

Get saved wifi password from your windows operating system

Python Script

https://medium.com/media/0327c1180821dda24de432c1cedbf926/href

Executing the Script

python3 wifi-password.py

14. Snapshot of the given website

This script will capture a screenshot of the website provided.

Installation

Read more about selenium here

pip install selenium
pip install chromedriver-binary==XX.X.XXXX.XX.X

Python script

https://medium.com/media/ba90e54c5005a08fcdb6fe69b5bdc745/href

Executing the Script

python3 website-screenshot.py <url-to-capture>

15. Split files into chunks

This script accepts split index and file name then splits it according to the index provided.

Installation

pip install pandas

Python script

https://medium.com/media/e4857f1f5f1ae52415328de6dcdb1ff6/href

Executing the Script

python3 split-file.py <csv_or_text_file_address> <number_of_lines_per_page>

Summary

In this article, I have discussed 5 Python scripts or 5 mini-projects that you can create to brush up on your Python skills. I hope these will help you learn something new. Clap 👏 on this post to learn more posts from this series of posts soon. Learn more Python script posts here.

I hope you enjoyed reading this lesson; you can follow me to read more tutorials from me in the future. Thank you for your time.

By becoming a Medium member, you can support me and your other favorite authors. Thanks! 👇

Join Medium with my referral link - Harendra Verma

More content at plainenglish.io. Sign up for our free weekly newsletter here.


5 More Useful Scripts in Python — 3 was originally published in Python in Plain English on Medium, where people are continuing the conversation by highlighting and responding to this story.





Follow Us

Follow us on facebook Click Here

Facebook QR
Scan from mobile
Join our telegram channel Click Here
Telegram QR
Scan from mobile