On 2016-08-14 13:54, Steven D'Aprano wrote: > 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?
Running OpenBSD on a PPC iBook G4: $ python3.5 Python 3.5.1 (default, Mar 6 2016, 01:17:51) [GCC 4.2.1 20070719 ] on openbsd5 Type "help", "copyright", "credits" or "license" for more information. >>> import platform >>> platform.machine() 'macppc' >>> platform.processor() 'powerpc' Just in case it matters. -tkc -- https://mail.python.org/mailman/listinfo/python-list