anatoly techtonik writes:
On Sun, Dec 29, 2013 at 3:15 PM, Chris Angelico email@example.com 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. (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()
Duh. Watch out for that time machine, Anatoly.
For more information, RTFM or try python-list.