Poproś o przywilej sudo od Pythona w macOS
os.system("""osascript -e 'do shell script "<commands go here>" " with administrator privileges'""")
Clear Cow
os.system("""osascript -e 'do shell script "<commands go here>" " with administrator privileges'""")