is_network_connected

pyhelpers.ops.is_network_connected()[source]

Check whether the current machine is connected to the Internet.

Returns:

True if the Internet connection is currently working, False otherwise.

Return type:

bool

Examples:

>>> from pyhelpers.ops import is_network_connected
>>> is_network_connected()  # Assuming we're currently connected to the Internet
True