Demandez le privilège sudo de Python dans MacOS

os.system("""osascript -e 'do shell script "<commands go here>" " with administrator privileges'""")
Clear Cow