View Single Post
Posts: 3,617 | Thanked: 2,412 times | Joined on Nov 2009 @ Cambridge, UK
#34
Originally Posted by fma View Post
Ok, but I still have the problem importing hildon before creating QApplication...
Not if you do something like:
Code:
maemo = 0
try:
    import PyQt4.QtMaemo5
    maemo = 1
except ImportError:
    pass

if not maemo:
    try:
        import hildon
        maemo = 1
    except ImportError:
        pass

if maemo:
    DATA_STORAGE_DIR = os.path.join....
else:
    DATA_STORAGE_DIR = HOME_DIR
Originally Posted by fma View Post
I have an idea; could you make the following test?
Does it work?
It works, but it doesn't pick up the hildon module, so doesn't set the correct path.