is_network_connected

pyhelpers.ops.is_network_connected()

Check whether the current machine can connect to the Internet.

Returns

whether the Internet connection is currently working

Return type

bool

Examples:

>>> from pyhelpers.ops import is_network_connected

>>> is_network_connected()  # assuming the machine is currently connected to the Internet
True