I wrote it wrong in the pythonfile, here's the correct version. On Sun, Aug 19, 2018 at 06:58:00PM +0200, Nicolas Sebrecht wrote: > On Sun, Aug 19, 2018 at 02:17:07PM +0000, J. Tull wrote: > > > > this becomes in offlineimap rc file like this: > > > > folderfilter = lambda folder: folder in \ > > [ ??my_dict[item_][0]?? for item_ in %(my_dict)s ] > > > # pythonfile: > > ALL_ACCOUNTS_FOLDERFILTER_DICT = { > 'account_a': ['one', 'two'], > 'account_b': ['three', 'four'], > } > > def get_filtered_folders(account_key_name): > return ALL_ACCOUNTS_FOLDERFILTER_DICT[account_key_name]
# 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_filtered_folders('account_a') > > -- > Nicolas Sebrecht -- Nicolas Sebrecht _______________________________________________ OfflineIMAP-project mailing list: OfflineIMAP-project@alioth-lists.debian.net https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/offlineimap-project OfflineIMAP homepages: - https://github.com/OfflineIMAP - http://offlineimap.org