Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import platform
- import subprocess
- def isMac():
- return platform.system() == "Darwin"
- def getProcessorMac():
- return subprocess.check_output(['sysctl','-n','machdep.cpu.brand_string']).decode('utf-8')
- def isM1():
- return getProcessorMac() == "Apple M1\n"
- if(isMac()):
- print(isM1())
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement