maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Development (https://talk.maemo.org/forumdisplay.php?f=13)
-   -   Troubles with python and gconf (https://talk.maemo.org/showthread.php?t=27452)

darethehair 2009-03-15 13:13

Re: Troubles with python and gconf
 
dwforslund:

I wonder if it would help to contact the 'PyMaemo' folks?

http://pymaemo.garage.maemo.org/

dwforslund 2009-03-30 02:43

Re: Troubles with python and gconf
 
I've tried to contact them with no response. I'm still in the dark as to why the gconf stuff isn't working. I wish I knew where to begin looking.

dwforslund 2009-03-30 02:52

Re: Troubles with python and gconf
 
If I do a python -v and then type "from gnome import gconf" I get:
import gnome # directory /usr/lib/python2.5/site-packages/gnome
# /usr/lib/python2.5/site-packages/gnome/__init__.pyo matches /usr/lib/python2.5/site-packages/gnome/__init__.py
import gnome # precompiled from /usr/lib/python2.5/site-packages/gnome/__init__.pyo
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: cannot import name gconf

dwforslund 2009-03-30 03:04

Re: Troubles with python and gconf
 
I looked at /usr/lib/python2.5/site-packages/gnome/__init__.py and it is 0 length.
It has the same time stamp as the __init__.pyo file in the same directory. Is this any clue?

dwforslund 2009-03-30 03:08

Re: Troubles with python and gconf
 
For labyrinth, it seems to refer to a file /etc/issue to see if it is an internet tablet before it does the from gnome import gconf. Each app that fails seems to invoke this same command but in a different way.

pycage 2009-03-30 05:57

Re: Troubles with python and gconf
 
Quote:

Originally Posted by dwforslund (Post 275660)
I looked at /usr/lib/python2.5/site-packages/gnome/__init__.py and it is 0 length.
It has the same time stamp as the __init__.pyo file in the same directory. Is this any clue?

This is perfectly OK. __init__.py may be of 0 size. It's just there to transform a plain directory into an importable package for python.
__init__.pyo on the other hand is simply the byte-compiled version of __init__.py.

dwforslund 2009-03-30 13:58

Re: Troubles with python and gconf
 
If there is nothing in __init__.py, how is the import gconf supposed to work?

pycage 2009-03-31 06:37

Re: Troubles with python and gconf
 
There should be a gconf.so file in the same directory.

dwforslund 2009-04-02 04:16

Re: Troubles with python and gconf
 
There is no gconf.so file in the directory. Only __init__.py and __init__.pyo.

darethehair 2009-04-02 16:32

Re: Troubles with python and gconf
 
Hey, I don't even have a '/usr/lib/python2.5/site-packages/gnome/' directory on my N800 -- nevermind any 'py' or 'pyo' files underneath it! I wonder if some aberrant package created the directory (when it should not have), and then messed you up?

I wonder what would happen if you temporarily *renamed* that directory so that it could not be found? This is just a suggestion -- I don't know the possible full impact of trying that.


All times are GMT. The time now is 00:37.

vBulletin® Version 3.8.8