From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26860 invoked by alias); 25 Mar 2008 18:30:31 -0000 Received: (qmail 26840 invoked by uid 22791); 25 Mar 2008 18:30:29 -0000 X-Spam-Check-By: sourceware.org Received: from NaN.false.org (HELO nan.false.org) (208.75.86.248) by sourceware.org (qpsmtpd/0.31) with ESMTP; Tue, 25 Mar 2008 18:30:09 +0000 Received: from nan.false.org (localhost [127.0.0.1]) by nan.false.org (Postfix) with ESMTP id C924798140; Tue, 25 Mar 2008 18:30:06 +0000 (GMT) Received: from caradoc.them.org (22.svnf5.xdsl.nauticom.net [209.195.183.55]) by nan.false.org (Postfix) with ESMTP id A5E689810C; Tue, 25 Mar 2008 18:30:06 +0000 (GMT) Received: from drow by caradoc.them.org with local (Exim 4.69) (envelope-from ) id 1JeDuP-0005JA-2j; Tue, 25 Mar 2008 14:30:05 -0400 Date: Tue, 25 Mar 2008 18:52:00 -0000 From: Daniel Jacobowitz To: Jim Blandy Cc: Tom Tromey , Thiago Jung Bauermann , gdb ml Subject: Re: repo to work on python scripting support Message-ID: <20080325183004.GA20107@caradoc.them.org> Mail-Followup-To: Jim Blandy , Tom Tromey , Thiago Jung Bauermann , gdb ml References: <1205538908.6643.138.camel@localhost.localdomain> <1206369478.29533.15.camel@localhost.localdomain> <20080325114520.GA21688@caradoc.them.org> <8f2776cb0803251118o316d261erb340d67bb0580967@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <8f2776cb0803251118o316d261erb340d67bb0580967@mail.gmail.com> User-Agent: Mutt/1.5.17 (2007-12-11) X-IsSubscribed: yes Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2008-03/txt/msg00223.txt.bz2 On Tue, Mar 25, 2008 at 11:18:12AM -0700, Jim Blandy wrote: > I don't know the most Pythonish way of doing things, but it seems to > me that Python could register not functions, but objects, to be > callable with $(). The object could have an 'interactive' member to > specify how to call it (say, "e" might mean, evaluate an expression > and pass its value to me, and "s" might mean, just hand it to me as a > string), and then some other method to actually do the call. Hmm, I've worked with some packages that did similar things using mandatory docstrings. def strcmp (expr1, expr2): """strcmp: EXPR, EXPR Compare expr1 and expr2 as strings.""" doit Dunno if that's wise. -- Daniel Jacobowitz CodeSourcery