import osascript scpt = ''' set vol to ((output volume of (get volume settings)) + 5) if (vol > 100) then set vol to 100 set volume output volume (vol) display notification ((vol) as string) ''' code, out, error = osascript.run(scpt) print(code, out, error)