{{man note|Important:|files in the gen submodule are '''not''' allowed to import files from the other submodules. So <code>gen</code> should be self-contained.}}
Generally (i.e. this is guidance, not a inviolable rule) imports should be grouped into three main sections: Python, GTK etc. and Gramps. Not all sections are required, include only those that apply. Other sections, or further grouping can be used if the developer thinks this will be useful. It may be useful to put imports in alphabetical order, but a logical order is also acceptable and may be preferable in some cases. It will often be useful to precede each main section with comment headers as in the following example: