Answers for "python check is admin"

0

python check is admin

import ctypes, os
    
def isAdmin()
  	try:
     	is_admin = os.getuid() == 0
    except AttributeError:
     	is_admin = ctypes.windll.shell32.IsUserAnAdmin() != 0
    return is_admin
Posted by: Guest on August-02-2020

Python Answers by Framework

Browse Popular Code Answers by Language