title: Edit a file as administrator in Python
body: <p>I'm writing a python script that will append a line in <code>C:\Windows\System32\drivers\etc\hosts</code>. How do I append a line in this file with administrator permission?</p>