View Single Post
Posts: 3,319 | Thanked: 5,610 times | Joined on Aug 2008 @ Finland
#30
If you *really* need it only for identification purposes, the platform module might come handy:

Code:
>>> import platform
>>> print platform.uname()
('Linux', 'Nokia-N900', '2.6.28.10', '#1 PREEMPT Wed May 26 00:24:03 EEST 2010', 'armv7l', '')
...
>>> print platform.uname()
('Linux', 'Nokia-N810-23-14', '2.6.21-omap1', '#2 Tue Oct 14 11:25 EEST 2008', 'armv6l','')
EDIT: to avoid confusion - the second string in the tuple is a hostname. Ideally, we could use platform.dist() but sadly that one is not entirely accurate
__________________
Blogging about mobile linux - The Penguin Moves!
Maintainer of PyQt (see introduction and docs), AppWatch, QuickBrownFox, etc

Last edited by attila77; 2010-07-06 at 12:13.