I'll start working on this now, unless you email me back to stop.

In addition, I suggest that we move the code into, this will allow us to start Gramps with:

import gramps

When I have finished, I'll also remove your temporary workaround.


On 30/09/12 20:33, Benny Malengier wrote:

With the change to gramps as a pure python module, we need a guideline on imports. You find it here:

Current Gramps in trunk does not yet satisfy this, so I will be working following days to bring all pieces in line. Feel free to help me!
Once this is done, I will remove the sys.path.append trick which is now in, as that is the reason it works at the moment.

So, all imports should start with
import gramps......
or be relative imports.

No relative imports allowed between gen, cli, gui and plugins submodules.

The idea is, is then the following works:

benny@dell:~$ PYTHONPATH=~/gramps/trunk/build/lib.linux-x86_64-2.7/ python
Python 2.7.3 (default, Aug  1 2012, 05:14:39)
[GCC 4.6.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from gramps.gen.lib import Date
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/benny/gramps/trunk/build/lib.linux-x86_64-2.7/gramps/gen/lib/", line 75, in <module>
    from markertype import MarkerType
  File "/home/benny/gramps/trunk/build/lib.linux-x86_64-2.7/gramps/gen/lib/", line 34, in <module>
    from gen.ggettext import gettext as _
ImportError: No module named gen.ggettext

Clearly it doesn't work yet :-)


Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:;258768047;13503038;j?

Gramps-devel mailing list