Eryk Sun added the comment: Using platform.architecture [1] is fine here. `bits` defaults to the size of a pointer in the current process, i.e. `struct.calcsize('P') * 8`.
On Windows, it's useless for anything except the default parameters. It doesn't call GetBinaryType [2] to distinguish 32-bit and 64-bit executables, so from a 64-bit process it will incorrectly return that a 32-bit executable is 64-bit. [1]: https://docs.python.org/3/library/platform.html#platform.architecture [2]: https://msdn.microsoft.com/en-us/library/aa364819 ---------- nosy: +eryksun _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue29124> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com