<DKIM> python in offlineimaprc

J. Tull heavytull at hotmail.com
Mon Aug 20 18:36:05 BST 2018

On +0200, Nicolas Sebrecht wrote:
> On Mon, Aug 20, 2018 at 06:44:21AM +0000, J. Tull wrote:
> > This is not the answer to my question,
> I've provided a sample of how the pythonfile is usually used in
> offlineimap, for years. It's known to work well. If you'd like to
> explore new ways, expect to do it mostly on your own.

it's a matter of having all the mailbox related settings in one file

> >                                        so i guess i can't use a
> > dictionary defined in the rc file directly in the lambda function
> > used to assign to the "folderfilter" variable.
> Perhaps like this (never tested):
> [ %(my_dict)s[k][0] for k in %(my_dict)s ]

i'll try

> > what about my first question in my op? how to import functions from
> > several python files?
> AFAIK, there's no import in the rc file. You can use usual python import
> in the pythonfile.

i employed the word "import", but it's abusively, actually i meant
that it seems only one file can be assigned to "pythonfile" variable.
As i said in my op, i prefer to spread the functions across several
python files. And i tried with making one file in which i imported
all the necessary functions from the different python files and i
assigned this one file to "pythonfile" in offlineimap rc file but
offlineimap complains not knowing the corresponding functions when

> The official documentation is there:
> https://docs.python.org/2/library/configparser.html

i'll have a look

> There might be some limitations in offlineimap because the library is
> not used as-is but there's a wrapper to it. See
> offlineimap/CustomConfig.py to know more.
> Regards,
> -- 
> Nicolas Sebrecht

More information about the OfflineIMAP-project mailing list