[Python-ideas] os.architecture
Stephen J. Turnbull
stephen at xemacs.org
Mon Dec 30 00:30:26 CET 2013
anatoly techtonik writes:
> On Sun, Dec 29, 2013 at 3:15 PM, Chris Angelico <rosuav at gmail.com> wrote:
> If Python is about readability then looking at your example, I have
> two questions:
> 1. What is platform - hardware, CPU, OS, Python flavor?
Everything you might want in this area. (Note: 'os' is the wrong
namespace for this. 'os' provides wrappers for OS services, not
platform information.) In particular
sum-65-1 08:16$ python
Python 2.6.1 (r261:67515, Aug 2 2010, 20:10:18)
[GCC 4.2.1 (Apple Inc. build 5646)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import platform
>>> platform.architecture()
('64bit', '')
>>> ^D
Duh. Watch out for that time machine, Anatoly.
For more information, RTFM or try python-list.
More information about the Python-ideas
mailing list