This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Re: repo to work on python scripting support
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