Skip to content

nandoabreu/simple-ping

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

simple-ping

Simple Python ping package published in PyPi.

 
 

README Map

Run from command line

From the project's root directory, please run the following command and follow instructions:

$ python -m ping

The main class

With the python console and the Ping class, we can get things running:

$ python
>>> from ping import Ping
>>> ping = Ping('localhost')
>>> print(f'Ping avg return: {ping.avg} ms')
>>> print(f'Ping errors return: {ping.returncode} {ping.stderr}')

Documentation

Please try from python console:

$ python
>>> import ping
>>> help(ping)

Or try from command line:

$ python -c "import ping; print(ping.__doc__)"

All documentation can be found in docs.