[Tutor] command to determine of python 32 or 64 bit?

eryk sun eryksun at gmail.com
Wed Aug 10 06:41:39 EDT 2016


On Wed, Aug 10, 2016 at 4:27 AM, Garry Willgoose
<g.willgoose at telluricresearch.com> wrote:
> I have a number of binary libraries that are dependent on whether the precompiled python
> distribution (eg. Enthought, ActiveState, etc)  in which they are installed are compiled with
> 32 or 64 bit. Is there any reliable way to determine at run time whether a python distribution
> is 32 or 64 bit? If I can determine at runtime then I can set the path for loading of my libraries
> to something different depending on whether the python is 32 or 64 bit.

Use platform.architecture()[0]. Currently the value will be either
"32bit" or "64bit".


More information about the Tutor mailing list