Patching libgmail to Work with the New Gmail Interface

Google has heavily modified the Gmail interface fairly (more AJAX, fewer page refreshes), heavily breaking libgmail. Fortunately, though, the folks at Google have kept the old interface. A quick patch will modify libgmail to use this old interface again.

  1. Download my patch here.
  2. cd to the directory containing libgmail. It might be located at /usr/lib/python-2.5/site-packages or /usr/local/lib/python-2.5/site-packages (or python-2.4 if you still have version 2.4). You’ll need su, obviously, unless you run your system as root.
  3. Patch with: patch libgmail.py libgmail.patch
  4. Test your scripts that use libgmail.py.

Until the developers of libgmail update their code, this will suffice. I haven’t tested the patch on older versions of libgmail (I’m using the newest version), but patch should at least report a fuzzy match.

By the way, I have found the next programming language that I intend to learn.

Share/Bookmark

2 Responses to “Patching libgmail to Work with the New Gmail Interface”


  • Hi I tried to check the patch you have given the link.
    But it takes me to an empty page. Can you please provide updated link for it.

    thanks
    spice

  • According to a friend, libgmail is pretty much officially defunct now that Gmail supports IMAP and SMTP. It’s a much better idea to just use some of the excellent bindings for these two protocols that Python offers.

    If you want to use Gmail on a command line, check out mail clients like sup[1] and mutt[2].

    [1] http://sup.rubyforge.org/
    [2] http://www.mutt.org/

Leave a Reply