python in offlineimaprc

J. Tull heavytull at hotmail.com
Sun Aug 19 15:17:07 BST 2018


it seems only one python file can be specified in offlineimaprc. As i
separated the functions in different files i created one python file
in which i'm importing the necessary functions and then i'm assigning
it to 'pythonfile' variable in the rc file. But it seems that doesn't
work, i think it's due to fact that importing is done within another
python session.

I created a dict containing tuples of remote folder names and
corresponding local ones within the rc file. I'm using these
variables like this '%(my_dict)s' later in a lambda funtion for
folderfilter. The function in pure python is like this:

    folders = lambda folder: folder in \
        [ my_dict[item_][0] for item_ in my_dict ]

this becomes in offlineimap rc file like this:

    folderfilter = lambda folder: folder in \
    	[ ??my_dict[item_][0]?? for item_ in %(my_dict)s ]

what i don't know how to translate from pure python to offlineimap rc
language is what i prepended and appended with '??'.




More information about the OfflineIMAP-project mailing list