Skip to content

Latest commit

 

History

History
19 lines (11 loc) · 539 Bytes

README.md

File metadata and controls

19 lines (11 loc) · 539 Bytes

hosts Build Status

Python wrapper to manage hosts file. Supports python 3.2, 3.3 and 3.4.

Usage:

>>> from hosts import Hosts
>>> hosts_obj = Hosts() # load hosts file automatically for windows and linux
>>> hosts_obj = Hosts(hosts_file='/ect/hosts') # point to specific hosts file

Save:

>>> hosts_obj.save()    # writes data back to hosts file

Changelog:

0.1 - Reads, removes comments and writes hosts file