Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- fh = open("C:WindowsSystem32driversetchello.txt", "w")
- fh.write("new line")
- fh.close()
- runas.exe /user:administrator "C:Python34python.exe myscript.py"
- fh = open(r"C:WindowsSystem32driversetchello.txt", "a") # add, not overwrite
- sudo python myscript.py
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement