use python to write some script and make the mac work better