[Tutor] command to determine of python 32 or 64 bit?
Alan Gauld
alan.gauld at yahoo.co.uk
Wed Aug 10 07:00:39 EDT 2016
On 10/08/16 11:41, eryk sun wrote:
>> 32 or 64 bit. Is there any reliable way to determine at run time whether a python distribution
>> is 32 or 64 bit?
>
> Use platform.architecture()[0]. Currently the value will be either
> "32bit" or "64bit".
I assumed that was sys.platform?
But on my Linux box I only get the string 'linux'
for platform...
So is the architecture bit windows only? Or is it
a different 'platform'?
--
Alan G
Author of the Learn to Program web site
http://www.alan-g.me.uk/
http://www.amazon.com/author/alan_gauld
Follow my photo-blog on Flickr at:
http://www.flickr.com/photos/alangauldphotos
More information about the Tutor
mailing list