python-hosts
python-hosts copied to clipboard
a hosts file manager library written in python
Hello there, I am the maintainer for coatldev/six and first, I'd like to thank you for using that image. Secondly, I would like to share my decision behind the future...
We had some code that uses `python-hosts` break on update to 1.0.4 because `Hosts.hosts_path` was renamed to `path` in https://github.com/jonhadfield/python-hosts/commit/fa0e8608e132fbf82b4c4184f01eb6d92720966d. Easy to fix once you know about it, but would...
 The windows system is a Chinese version, can it be detected? Open the file using GBK encoding。
I wrote a script some days ago to modify my hostfile on my system importing python-hosts. It worked absolutely fine, but since I guess the 21th of september, don't remember...
Running the following program ```python from python_hosts import Hosts, HostsEntry host = HostsEntry( entry_type='ipv4', address='10.10.10.10', names=['samsung', 'samsung.local'], ) entries = [] entries.append(host) entries.append(host) hosts = Hosts('testhosts') hosts.add(entries, force=True) hosts.write() ```...