Block hosts with this simple pyhon library
Just Python 3
Execute __main__.py with admin rights. If you do not, you'll be notified to do so.
sudo python3 hostsfile-blocker
or
sudo python3 __main__.py
Note: Windows users, do not have to prefix the exectuion with "sudo".
If your hostsfile is located somewhere else than /etc/hosts, set the path to your hostsfile with the method set_hosts_file.
Usually the Windows hosts file is found under C:\Windows\System32\drivers\etc\hosts.
Usually the MacOS hosts file is found under /private/etc/hosts.
Wildcards are not supported by the hostsfile