On Mon, Dec 30, 2013 at 2:30 AM, Stephen J. Turnbull email@example.com wrote:
anatoly techtonik writes:
On Sun, Dec 29, 2013 at 3:15 PM, Chris Angelico firstname.lastname@example.org wrote:
If Python is about readability then looking at your example, I have two questions:
- What is platform - hardware, CPU, OS, Python flavor?
Everything you might want in this area.
I want to know if I am running 32-bit or 64-bit Windows on my 64-bit CPU. So, how to resolve the ambiguity?
(Note: 'os' is the wrong namespace for this. 'os' provides wrappers for OS services, not platform information.) In particular
For OS information, 'os' is a logical namespace. I don't know about CPU info though. Would be nice to have 'hardware' or 'hwinfo' module in stdlib. I don't know where info about Python bitness should be.
import platform platform.architecture()