How do I tell if I'm running on a PowerPC?

Steven D'Aprano steve+python at pearwood.info
Sat Aug 13 23:54:01 EDT 2016


I need to be able to programmatically test whether I'm running on a PowerPC.
How can I do that?

import platform
if platform.machine() in ('ppc', 'ppc64'):
    print('running PowerPC')


Is that right?


-- 
Steve
“Cheer up,” they said, “things could be worse.” So I cheered up, and sure
enough, things got worse.




More information about the Python-list mailing list