def isAdmin():
    """
    If the user is admin, return True.
    """
    import sys, os, traceback, types
    if os.name == 'nt':
        import ctypes
        try:
            return ctypes.windll.shell32.IsUserAnAdmin()
        except:
            traceback.print_exc()
            return False
    elif os.name == 'posix':
        return os.getuid() == 0
    else:
        pass
