Menu

Main Menu
Talk Get Daily Search

Member's Online

    User Name
    Password

    Detecting Maemo version in Python?

    Reply
    terminal3 | # 1 | 2010-04-25, 22:36 | Report

    Is there a way to determine which version of Maemo a Python app is running on from within Python? I've poked around using a few methods, but I haven't found any way other than determining the version of Python instead of Maemo.

    Apologies if this is a stupid question, I'm still very new to Python development.

    Edit | Forward | Quote | Quick Reply | Thanks

     
    MohammadAG | # 2 | 2010-04-25, 22:44 | Report

    Might not be the easiest/best way but...
    Code:
    os.popen('dpkg -l mp-fremantle*"').read()
    Originally Posted by
    Nokia-N900-02-8:~# dpkg -l mp-fremantle*
    Desired=Unknown/Install/Remove/Purge/Hold
    | Status=Not/Inst/Cfg-files/Unpacked/Failed-cfg/Half-inst/trig-aWait/Trig-pend
    |/ Err?=(none)/Hold/Reinst-required/X=both-problems (Status,Err: uppercase=bad)
    ||/ Name Version Description
    +++-==============-==============-============================================
    ii mp-fremantle-g 3.2010.02-8
    Version is there.

    Oh and don't forget to import os

    Edit | Forward | Quote | Quick Reply | Thanks

    Last edited by MohammadAG; 2010-04-25 at 22:52.
    The Following User Says Thank You to MohammadAG For This Useful Post:
    terminal3

     
    Venemo | # 3 | 2010-04-26, 00:05 | Report

    Actually, you could check the output of dpkg -l and check for specific packages.
    The mp-fremantle is the first to be uninstalled if you break a dependency, so I wouldn't depend on that alone.

    Edit | Forward | Quote | Quick Reply | Thanks
    The Following User Says Thank You to Venemo For This Useful Post:
    terminal3

     
    Rob1n | # 4 | 2010-04-26, 08:20 | Report

    You can check the output of "osso-product-info" - for the OS version just run:
    Code:
    osso-product-info -q OSSO_PRODUCT_RELEASE_VERSION

    Edit | Forward | Quote | Quick Reply | Thanks
    The Following 3 Users Say Thank You to Rob1n For This Useful Post:
    emesem, terminal3, Venemo

     
    terminal3 | # 5 | 2010-04-26, 12:34 | Report

    OSSO_PRODUCT_RELEASE_VERSION doesn't give me results that look too useful, but OSSO_PRODUCT_NAME will work like a charm.

    Thanks!

    Edit | Forward | Quote | Quick Reply | Thanks
    The Following User Says Thank You to terminal3 For This Useful Post:
    emesem

     
    terminal3 | # 6 | 2010-04-26, 12:36 | Report

    I could probably have been more specific, I was looking for the major release version of Maemo, not update version. Thanks for your help everyone.

    Edit | Forward | Quote | Quick Reply | Thanks

     
vBulletin® Version 3.8.8
Normal Logout