If it is not possible for a script using libgmail to be
running constantly there will be a delay each time the
script is run while the Gmail account is logged into.
In certain circumstances (e.g. if being called by a
Window Manager) this delay is undesirable.
This is what I have sent to a libgmail user on this topic:
A solution would be to login the first time the script
is run & then cache (probably by way of Python's
"pickle" mechanism, although a simple text file might
work too) the Gmail account's state information.
I think the only state you would need to keep is the
content of the "cookie jar" and the login name. You
could then reuse this state when the script is next run
for the same user. You could probably hack the
internals a little to get this to work, or I could
maybe implement it "properly" in the API. I'll have a
think about it. (This approach should work even if a
large amount of time passes between calls because I
don't think Gmail times out often.)
--Phil.
Logged In: YES
user_id=786616
this feature seems to have become more pressing; because
gmail has started to put up a CAPTCHA for accounts which are
logged into frequently (as would be the case for a script
written using the current version of libgmail).