Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
branch: master
Fetching contributors…

Cannot retrieve contributors at this time

executable file 13 lines (12 sloc) 0.374 kB
#!/usr/bin/env python
hosts = (
('192.168.0.78', 'massive'),
('192.168.0.106', 'time'),
('192.168.0.189', 'pascal'),
('192.168.0.250', 'phoenix'),
('192.168.0.253', 'tzara')
)
with open('/etc/hosts', 'a') as hostfile:
hostfile.write("\n# automagically appended by ~/.mkhosts.py\n")
for host in hosts:
hostfile.write("%s %s\n" % host)
Jump to Line
Something went wrong with that request. Please try again.