Build a GUI Application to ping the host using Python Last Updated : 04 Dec, 2021 Comments Improve Suggest changes Like Article Like Report Prerequisite: Python GUI – Tkinter In this article, we are going to see how to ping the host with a URL or IP using the python ping module in Python. This module provides a simple way to ping in python. And It checks the host is available or not and measures how long the response takes. “Before” starting we need to install this module into your system. pip install pythonping The GUI would look like below: Syntax: ping('URL or IP') Parameter: verbose : enables the verbose mode, printing output to a streamtimeout : is the number of seconds you wish to wait for a response, before assuming the target is unreachablepayload : allows you to use a specific payload (bytes)size : is an integer that allows you to specify the size of the ICMP payload you desire Code: Python3 # import module from pythonping import ping # pinging the host ping('www.google.com', verbose=True) Output: Reply from 142.250.71.4, 9 bytes in 61.09ms Reply from 142.250.71.4, 9 bytes in 60.24ms Reply from 142.250.71.4, 9 bytes in 60.22ms Reply from 142.250.71.4, 9 bytes in 60.04ms Reply from 142.250.71.4, 9 bytes in 61.09ms Reply from 142.250.71.4, 9 bytes in 60.24ms Reply from 142.250.71.4, 9 bytes in 60.22ms Reply from 142.250.71.4, 9 bytes in 60.04ms Round Trip Times min/avg/max is 60.04/60.4/61.09 ms Implementation for GUI: Pinging GUI Application with Tkinter Python3 # import modules from tkinter import * from pythonping import ping def get_ping(): result = ping(e.get(), verbose=True) res.set(result) # object of tkinter # and background set for light grey master = Tk() master.configure(bg='light grey') # Variable Classes in tkinter res = StringVar() # Creating label for each information # name using widget Label Label(master, text="Enter URL or IP :", bg="light grey").grid(row=0, sticky=W) Label(master, text="Result :", bg="light grey").grid(row=1, sticky=W) # Creating label for class variable # name using widget Entry Label(master, text="", textvariable=res, bg="light grey").grid( row=1, column=1, sticky=W) e = Entry(master) e.grid(row=0, column=1) # creating a button using the widget # Button that will call the submit function b = Button(master, text="Show", command=get_ping) b.grid(row=0, column=2, columnspan=2, rowspan=2, padx=5, pady=5) mainloop() Output: Comment More infoAdvertise with us Next Article Build a GUI Application to ping the host using Python kumar_satyam Follow Improve Article Tags : Python python-utility Python-tkinter Python Tkinter-exercises Practice Tags : python Similar Reads GUI chat application using Tkinter in Python Chatbots are computer program that allows user to interact using input methods. The Application of chatbots is to interact with customers in big enterprises or companies and resolve their queries. Â Chatbots are mainly built for answering standard FAQs. The benefit of this type of system is that cust 7 min read An application to test the given page is found or not on the server using Python Prerequisite: Python Urllib module In this article, we are going to write scripts to test whether the given page is found on the server or not with a GUI application. We need to Install Urllib Module to carry out this operation. Type this command in your terminal. pip install urllib Approach: Import 2 min read Create a GUI to find the IP for Domain names using Python Prerequisite: Python GUI â tkinterIn this article, we are going to see how to find IP from Domain Names and bind it with GUI Application using Python. We will use iplookup module for looking up IP from Domain Names. It is a small module which accepts a single domain as a string, or multiple domains 2 min read Create First GUI Application using Python-Tkinter We are now stepping into making applications with graphical elements, we will learn how to make cool apps and focus more on its GUI(Graphical User Interface) using Tkinter.What is Tkinter?Tkinter is a Python Package for creating GUI applications. Python has a lot of GUI frameworks, but Tkinter is th 12 min read PyQt5 - Application to get the price of BitCoin In this article we will see how we can make a PyQt5 application which tells the real time price of the bitcoin. Modules required and Installation: PyQt5 : PyQt5 is a Python binding of the cross-platform GUI toolkit Qt, implemented as a Python plug-in. PyQt5 is free software developed by the British 3 min read Like