Advertisement
Guest User

Untitled

a guest
Feb 27th, 2017
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.21 KB | None | 0 0
  1. import os
  2.  
  3. def checkIfAdmin():
  4. try:
  5. with open('c:\\admincheck.txt', 'w') as the_file:
  6. the_file.write('Test\n')
  7. os.remove('c:\\admincheck.txt')
  8. return True
  9. except:
  10. return False
  11.  
  12. print checkIfAdmin()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement