<DKIM> python in offlineimaprc

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


On +0200, Nicolas Sebrecht wrote:
> On Sun, Aug 19, 2018 at 07:49:18PM +0200, Nicolas Sebrecht wrote:
> 
> > # pythonfile
> > 
> > FOLDERFILTER_DICT = {
> >     'account_a': ['one', 'two'],
> >     'account_b': ['three', 'four'],
> > }
> > 
> > 
> > def get_folderfilter_function(account_key_name):
> >     def folderfilter_function(folder):
> >         return folder in FOLDERFILTER_DICT[account_key_name]
> >     return folderfilter_function
> > 
> # offlineimaprc
> 
> folderfilter = get_folderfilter_function('account_a')
> 
> -- 
> Nicolas Sebrecht

This is not the answer to my question, 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.

what about my first question in my op? how to import functions from
several python files?




More information about the OfflineIMAP-project mailing list