[Tutor] os.name on Windows 98

Magnus Lyckå magnus@thinkware.se
Sun Jul 13 06:39:01 2003


At 10:34 2003-07-11 +0100, Rodrigues wrote:
>In the upcoming 2.3 there is a module called platform for, and I quote
>
>"find out everything you always wanted to know about your platform,
>but were afraid to ask. "

Yet another reason to upgrade to Python 2.3b2... :)

 >>> import platform
 >>> for x in dir(platform):
         try:
                 print "%s = %s" % (x, eval('platform.%s()' % x))
         except:
                 pass


_node = nida
_sys_version = ('2.3b2.0', 43, 'Jun 29 2003 16:43:04', 'MSC v.1200 32 bit 
(Intel)')
_syscmd_ver = ('Microsoft Windows', '2000', '5.0.2195')
architecture = ('32bit', 'WindowsPE')
dist = ('', '', '')
java_ver = ('', '', ('', '', ''), ('', '', ''))
libc_ver = ('', '')
mac_ver = ('', ('', '', ''), '')
machine =
node = nida
platform = Windows-2000-5.0.2195-SP3
processor =
python_build = (43, 'Jun 29 2003 16:43:04')
python_compiler = MSC v.1200 32 bit (Intel)
python_version = 2.3b2.0
python_version_tuple = ['2', '3b2', '0']
release = 2000
system = Windows
uname = ('Windows', 'nida', '2000', '5.0.2195', '', '')
version = 5.0.2195
win32_ver = ('2000', '5.0.2195', 'SP3', 'Uniprocessor Free')

The "win32_ver" thingie didn't work until I installed the win32all toolkit.

Same code on a Linux box:

_node = kaunas
_sys_version = ('2.3b2.0', 1, 'Jul  4 2003 23:13:33', 'GCC 3.2 (Mandrake 
Linux 9.0 3.2-1mdk)')
_syscmd_ver = ('', '', '')
architecture = ('32bit', 'ELF')
dist = ('mandrake', '9.0', 'dolphin')
java_ver = ('', '', ('', '', ''), ('', '', ''))
libc_ver = ('glibc', '2.2')
mac_ver = ('', ('', '', ''), '')
machine = i686
node = kaunas
platform = Linux-2.4.19-16mdk-i686-with-mandrake-9.0-dolphin
processor =
python_build = (1, 'Jul  4 2003 23:13:33')
python_compiler = GCC 3.2 (Mandrake Linux 9.0 3.2-1mdk)
python_version = 2.3b2.0
python_version_tuple = ['2', '3b2', '0']
release = 2.4.19-16mdk
system = Linux
uname = ('Linux', 'kaunas', '2.4.19-16mdk', '#1 Fri Sep 20 18:15:05 CEST 
2002', 'i686', '')
version = #1 Fri Sep 20 18:15:05 CEST 2002
win32_ver = ('', '', '', '')


--
Magnus Lycka (It's really Lyckå), magnus@thinkware.se
Thinkware AB, Sweden, www.thinkware.se
I code Python ~ The Agile Programming Language