1 Return-Path: <bgamari.foss@gmail.com>
\r
2 X-Original-To: notmuch@notmuchmail.org
\r
3 Delivered-To: notmuch@notmuchmail.org
\r
4 Received: from localhost (localhost [127.0.0.1])
\r
5 by olra.theworths.org (Postfix) with ESMTP id 7B12D431FBC
\r
6 for <notmuch@notmuchmail.org>; Mon, 25 Jan 2010 19:53:28 -0800 (PST)
\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org
\r
11 X-Spam-Status: No, score=-1.499 tagged_above=-999 required=5
\r
12 tests=[AWL=-1.500, BAYES_50=0.001] autolearn=ham
\r
13 Received: from olra.theworths.org ([127.0.0.1])
\r
14 by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)
\r
15 with ESMTP id 5U-3YaAVafUL for <notmuch@notmuchmail.org>;
\r
16 Mon, 25 Jan 2010 19:53:27 -0800 (PST)
\r
17 Received: from mail-yx0-f204.google.com (mail-yx0-f204.google.com
\r
19 by olra.theworths.org (Postfix) with ESMTP id 949CD431FAE
\r
20 for <notmuch@notmuchmail.org>; Mon, 25 Jan 2010 19:53:27 -0800 (PST)
\r
21 Received: by yxe42 with SMTP id 42so1974332yxe.22
\r
22 for <notmuch@notmuchmail.org>; Mon, 25 Jan 2010 19:53:27 -0800 (PST)
\r
23 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;
\r
24 h=domainkey-signature:received:received:from:to:subject:date
\r
25 :message-id:x-mailer;
\r
26 bh=05I21vRh7k0mZpRvprY8Dk7JKoOR3yyz1iNO13q88Ys=;
\r
27 b=sXG64EIVnN6ngUE1jNedEZGT5w9LR7CJWchBrK3+Tgv6nKyHajLGNdlT0ZTbdXB3f5
\r
28 VqJxSVOIqc0u9b4DNDlroGA2Puo/TPwidOEXfzlGeQKS8PnWQ0ba50Ud+6iL2ScoOAYy
\r
29 2ny2qo0qpvRTAj5QvcHe+/FVWVTCfpyDwvmic=
\r
30 DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma;
\r
31 h=from:to:subject:date:message-id:x-mailer;
\r
32 b=GeEV926Tc4o0P8dIiGqSx8yjTrF4uF1Juytwgv0dU8SkoeCZFrlFl2Pb2P3T1Z98lu
\r
33 p3W55/QVl5lLv8exm3TueZ6IVwYz2yaARXtKuHBMuCuVk6hrcnmeYvRYpeGS/k8DXsZM
\r
34 ZXEH7uHhzUq9gCZPqdx3JkT7SKGAqfdNsFhGc=
\r
35 Received: by 10.151.92.9 with SMTP id u9mr9768025ybl.158.1264478007176;
\r
36 Mon, 25 Jan 2010 19:53:27 -0800 (PST)
\r
37 Received: from localhost.localdomain (umass-959-100.wireless.umass.edu
\r
39 by mx.google.com with ESMTPS id 9sm1980893ywe.26.2010.01.25.19.53.25
\r
40 (version=SSLv3 cipher=RC4-MD5); Mon, 25 Jan 2010 19:53:26 -0800 (PST)
\r
41 From: Ben Gamari <bgamari.foss@gmail.com>
\r
42 To: notmuch@notmuchmail.org
\r
43 Date: Mon, 25 Jan 2010 22:53:17 -0500
\r
44 Message-Id: <1264477998-20681-1-git-send-email-bgamari.foss@gmail.com>
\r
45 X-Mailer: git-send-email 1.6.3.3
\r
46 Subject: [notmuch] [PATCH] SWIG bindings
\r
47 X-BeenThere: notmuch@notmuchmail.org
\r
48 X-Mailman-Version: 2.1.13
\r
50 List-Id: "Use and development of the notmuch mail system."
\r
51 <notmuch.notmuchmail.org>
\r
52 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,
\r
53 <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>
\r
54 List-Archive: <http://notmuchmail.org/pipermail/notmuch>
\r
55 List-Post: <mailto:notmuch@notmuchmail.org>
\r
56 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>
\r
57 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,
\r
58 <mailto:notmuch-request@notmuchmail.org?subject=subscribe>
\r
59 X-List-Received-Date: Tue, 26 Jan 2010 03:53:28 -0000
\r
64 Here's the latest version of my patch adding SWIG interface generation to
\r
65 notmuch. It has been rebased on the shared-library patches I sent over earlier
\r
66 this week, so you'll need those as well. Unfortunately, SWIG has effectively no
\r
67 support for exposing notmuch's C-style object-oriented interface in a
\r
68 reasonable manner. Therefore, I use SWIG to generate a set of low-level
\r
69 bindings which is then wrapped with a light-weight module properly exposing the
\r
70 functions in their intended class structure. This seems like a fairly good
\r
71 solution, given the wide variety of capabilities possessed by modern high-level
\r
74 As you can see, it all works quite nicely,
\r
76 [2252 ben@ben-laptop swig(swig)] $ python
\r
77 Python 2.6.4 (r264:75706, Dec 7 2009, 18:43:55)
\r
78 [GCC 4.4.1] on linux2
\r
79 Type "help", "copyright", "credits" or "license" for more information.
\r
80 >>> from notmuch import Database
\r
81 >>> db=Database.open('/home/ben/.mail', Database.MODE_READ_ONLY)
\r
82 >>> for tag in db.get_all_tags(): print tag
\r
88 Let me know what you think. Thanks!
\r