Reputation: 5038
I'd like to be able to do stuff like
from os import system
system(f'say "hello world"')
But this only works on Mac, not iOS.
I know I can detect a Mac by using platform.system()
, but that doesn't tell me Mac vs iOS.
I've also noticed that platform().platform()
has the substring "iPad" in it when I'm running on an iPad, but I'm not sure if that's documented/can be relied on, or if on an iPhone it will do something similar.
Upvotes: 0
Views: 52
Reputation: 148
You may use the following code.
from sys import platform
print(platform)
Upvotes: 1