Author Michael.Felt
Recipients Arfrever, Dima.Tisnek, Michael.Felt, djones, eric.araujo, jaraco, jkloth, madprog, ned.deily, pitrou, sferencik, tarek
Date 2016-10-31.20:34:26
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1477946066.59.0.592565757131.issue18987@psf.upfronthosting.co.za>
In-reply-to
Content
FYI: This is 'actual' as I am working on an implementation of a cloud-init distro for AIX and it is very difficult to figure out the correct approach for a replacement value for os.uname[4] - when comparing with "Linux" logic

I was thinking of using

platform.platform().split("-")[3]

but both are 32-bit on 64-bit hardware:

>>> platform.platform().split("-")
['AIX', '1', '00C291F54C00', 'powerpc', '32bit']
>>> platform.platform().split("-")[4]
'32bit'
>>> platform.platform().split("-")[3]
'powerpc'

>>> platform.platform().split("-")
['Linux', '3.2.0', '4', 'powerpc64', 'ppc64', 'with', 'debian', '7.8']
>>> platform.platform().split("-")[4]
'ppc64'
>>> platform.platform().split("-")[3]
'powerpc64'

This - also - seems tricky re: the placement of the -
>>> platform.platform()
'Linux-3.2.0-4-powerpc64-ppc64-with-debian-7.8'

compared with:
>>> platform.platform()
'AIX-1-00C291F54C00-powerpc-32bit'

Truely, some guidance from "the powers that be" is needed if there is ever to be uniformity. And if it 'cannot' be patched on 'old' versions, at least there will be a way to hack clarity into code (imho, a patch is better rather than hacks creating continued diversity - everyone continues to use their understanding of intent, creating new diverse wishes (aka features not benefits)) for what the code "must" do - because there are so many projects that used it this way (and others that used it that way) ....

:)
History
Date User Action Args
2016-10-31 20:34:26Michael.Feltsetrecipients: + Michael.Felt, jaraco, pitrou, tarek, jkloth, ned.deily, eric.araujo, Arfrever, madprog, Dima.Tisnek, sferencik, djones
2016-10-31 20:34:26Michael.Feltsetmessageid: <1477946066.59.0.592565757131.issue18987@psf.upfronthosting.co.za>
2016-10-31 20:34:26Michael.Feltlinkissue18987 messages
2016-10-31 20:34:26Michael.Feltcreate