[Tutor] Re: platform info

Prahlad Vaidyanathan slime@vsnl.net
Sat, 3 Aug 2002 16:13:12 +0530


--AhhlLboLdkugWU4S
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

Hi,

On Fri, 02 Aug 2002 Einar Th. Einarsson spewed into the ether:
> Hey gang.
>=20
>   In my ongoing quest to write truly portable and dynamic code, I need my=
=20
> application to be able to gather the following system information at runt=
ime:
>=20
> CPU info:
[-- snippity --]
> Information as to how to retrieve any of the above without directly using=
=20
> system specific function or system calls would be greatly appreciated.=20

    Well, for whatever it is worth, you could check out the 'os'
module. eg :

"""
>>> import os
>>> os.getenv("MACHTYPE")
'i586-mandrake-linux-gnu'
>>> os.uname()
('Linux', 'localhost.localdomain', '2.4.3-20mdk', '#1 Sun Apr
15 23:03:10 CEST 2001', 'i686')
>>>
"""

    HTH,

pv.
--=20
Prahlad Vaidyanathan  <http://www.symonds.net/~prahladv/>

It's not enough to be Hungarian; you must have talent too.
		-- Alexander Korda

--AhhlLboLdkugWU4S
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.4 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQE9S7PAIKhjOSElu4YRAoO6AJ93XcK/culnJY5gVfzo12WVNLyVYQCfYSoX
ogYYk945bEjqVzn9Y6JcbCY=
=42yL
-----END PGP SIGNATURE-----

--AhhlLboLdkugWU4S--