On Sat, Feb 18, 2012 at 13:22, Gremlin <[email protected]> wrote:
> This may help:
>
> WIN64 = 'PROGRAMFILES(X86)' in os.environ
>
> Best regards
> ________________________________
>
> Von: [email protected]
> [mailto:[email protected]] Im Auftrag von
> Vernon Cole
> Gesendet: Samstag, 18. Februar 2012 17:53
> An: [email protected]
> Betreff: [python-win32] How do I detect a 64 bit version of Windows?
>
>So, how can I tell which "width" of Windows I am running, so I know which
> connection string to use?

import platform
platform.machine()

That will return "AMD64" on 64 bit. I don't have a 32-bit machine
available but I believe it returns "x86".


ps, I can't find your thread on the IronPython list right now, but
platform.architecture() will help you find the architecture Python is
compiled for.
_______________________________________________
python-win32 mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-win32

Reply via email to