using inspect

2009-11-11 Thread Ethan Furman
Greetings! How wise is it to base code on inspect? Specifically on things like live frames on the stack and whatnot. It occurs to me that this is leaning towards implementation details, and away from pure, pristine Python. As an example, I have this routine in a module I'm working on: def

Re: using inspect

2009-11-11 Thread Steven D'Aprano
On Wed, 11 Nov 2009 18:15:22 -0800, Ethan Furman wrote: Greetings! How wise is it to base code on inspect? Specifically on things like live frames on the stack and whatnot. It occurs to me that this is leaning towards implementation details, and away from pure, pristine Python. As an

Re: using inspect on pygtk

2007-10-01 Thread Chris Pax
On Sep 28, 9:57 pm, Chris Pax [EMAIL PROTECTED] wrote: Hello, I recently been trying to use the inspect module to inspect the arguments of gtk objects, such as gtk.Button. I tried like this: inspect.getargspec(gtk.Button.__init__) and get the fallowing error: File stdin, line 1, in

Re: using inspect on pygtk

2007-10-01 Thread Cousin Stanley
I recently been trying to use the inspect module to inspect the arguments of gtk objects, such as gtk.Button. does anybody have any idea? Chris You might try the following newsgroup on the Gmane server for Python / Gtk questions gmane.comp.gnome.gtk+.python

Re: using inspect on pygtk

2007-10-01 Thread BJörn Lindqvist
On 9/29/07, Chris Pax [EMAIL PROTECTED] wrote: Hello, I recently been trying to use the inspect module to inspect the arguments of gtk objects, such as gtk.Button. I tried like this: inspect.getargspec(gtk.Button.__init__) and get the fallowing error: File stdin, line 1, in module

Re: using inspect on pygtk

2007-10-01 Thread Chris Pax
On Oct 1, 12:53 pm, BJörn Lindqvist [EMAIL PROTECTED] wrote: On 9/29/07, Chris Pax [EMAIL PROTECTED] wrote: Hello, I recently been trying to use the inspect module to inspect the arguments of gtk objects, such as gtk.Button. I tried like this: inspect.getargspec(gtk.Button.__init__)

using inspect on pygtk

2007-09-28 Thread Chris Pax
Hello, I recently been trying to use the inspect module to inspect the arguments of gtk objects, such as gtk.Button. I tried like this: inspect.getargspec(gtk.Button.__init__) and get the fallowing error: File stdin, line 1, in module File /usr/lib/python2.5/inspect.py, line 743, in

question about introspection using inspect module

2005-07-07 Thread Benjamin Rutt
I'm trying to learn about introspection in Python. my ultimate goal is to be able to build a module text database of all modules that are in the sys.path, by discovering all candidate modules (I've already done that), importing all of them, and then introspecting on each module to discover its

Re: question about introspection using inspect module

2005-07-07 Thread Fernando Perez
Benjamin Rutt wrote: I'm trying to learn about introspection in Python. my ultimate goal is to be able to build a module text database of all modules that are in the sys.path, by discovering all candidate modules (I've already done that), importing all of them, and then introspecting on

Re: question about introspection using inspect module

2005-07-07 Thread Benjamin Rutt
Fernando Perez [EMAIL PROTECTED] writes: I certainly don't want to discourage you from learning about python introspection, it's one of the most fun aspects of the language. But just as an FYI, the pydoc system already does much of what you have in mind, at least if I'm reading your

Re: question about introspection using inspect module

2005-07-07 Thread Fernando Perez
Benjamin Rutt wrote: Fernando Perez [EMAIL PROTECTED] writes: I certainly don't want to discourage you from learning about python introspection, it's one of the most fun aspects of the language. But just as an FYI, the pydoc system already does much of what you have in mind, at least if

Re: question about introspection using inspect module

2005-07-07 Thread Mike Meyer
Benjamin Rutt [EMAIL PROTECTED] writes: what I am actually trying to do is to build a database of Python modules. so then later, I can write a tool in my favorite editor (Emacs) to invoke some forms of completion against this database (e.g. os.removTAB or socket.TAB to see a list of all