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?

_______________________________________________
OfflineIMAP-project mailing list: [email protected]
https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/offlineimap-project

OfflineIMAP homepages:
- https://github.com/OfflineIMAP
- http://offlineimap.org

Reply via email to