Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import os
- def checkIfAdmin():
- try:
- with open('c:\\admincheck.txt', 'w') as the_file:
- the_file.write('Test\n')
- os.remove('c:\\admincheck.txt')
- return True
- except:
- return False
- print checkIfAdmin()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement