[maemo-developers] Identifying platform in Python code

From: Frantisek Dufka dufkaf at seznam.cz
Date: Mon Jun 4 22:49:39 EEST 2007
Jeffrey Barish wrote:
> How do I determine in my code that I am running on the N800?  Neither
> os.name nor sys.platform gets the job done.  The former returns "posix",
> the latter "linux2", and I get the same strings when I run on Ubuntu.

Check /etc/osso_software_version file. This is the firmware version. 
RX-34 on the beginning means N800. Of course this is not very portable 
and may fail in future but currently it work for both N770 and N800.

Frantisek


More information about the maemo-developers mailing list