RE: Class introspection and dynamically determining function arguments

2005-01-24 Thread Mark English
Thanks for the pointers to traits, BasicProperty, and harold fellermann's sample code... --- The information contained in this e-mail is confidential and solely for the intended addressee(s). Unauthorised reproduction, disclosur

Re: Class introspection and dynamically determining function arguments

2005-01-22 Thread Mike C. Fletcher
Bengt Richter wrote: On Fri, 21 Jan 2005 20:23:58 -0500, "Mike C. Fletcher" <[EMAIL PROTECTED]> wrote: On Thu, 20 Jan 2005 11:24:12 -, "Mark English" <[EMAIL PROTECTED]> wrote: ... Does the BasicProperty base class effectively register itself as an observer of subclass properties and

Re: Class introspection and dynamically determining function arguments

2005-01-22 Thread Alex Martelli
Diez B. Roggisch <[EMAIL PROTECTED]> wrote: > Nick Coghlan wrote: > > > > If this only has to work for classes created for the purpose (rather than > > for an arbitrary class): > > Certainly a step into the direction I meant - but still missing type > declarations. And that's what at least I'd l

Re: Class introspection and dynamically determining function arguments

2005-01-22 Thread Bengt Richter
On Fri, 21 Jan 2005 20:23:58 -0500, "Mike C. Fletcher" <[EMAIL PROTECTED]> wrote: > >>On Thu, 20 Jan 2005 11:24:12 -, "Mark English" <[EMAIL PROTECTED]> wrote: >> >> >> >>>I'd like to write a Tkinter app which, given a class, pops up a >>>window(s) with fields for each "attribute" of that c

Re: Class introspection and dynamically determining function arguments

2005-01-21 Thread Mike C. Fletcher
On Thu, 20 Jan 2005 11:24:12 -, "Mark English" <[EMAIL PROTECTED]> wrote: I'd like to write a Tkinter app which, given a class, pops up a window(s) with fields for each "attribute" of that class. The user could enter values for the attributes and on closing the window would be returned an i

Re: Class introspection and dynamically determining function arguments

2005-01-21 Thread Bengt Richter
On Thu, 20 Jan 2005 11:24:12 -, "Mark English" <[EMAIL PROTECTED]> wrote: >I'd like to write a Tkinter app which, given a class, pops up a >window(s) with fields for each "attribute" of that class. The user could >enter values for the attributes and on closing the window would be >returned an

RE: Class introspection and dynamically determining function arguments

2005-01-21 Thread Mark English
Diez B. Roggisch wrote: > According to this > http://www-106.ibm.com/developerworks/library/l-pyint.html > > not really - and there are no special moduls neccessary, as > everything is at your hands using __dict__ and so on. Thanks for the link. I'd read that article but found it was too introd

Re: Class introspection and dynamically determining function arguments

2005-01-21 Thread Nick Coghlan
Diez B. Roggisch wrote: Nick Coghlan wrote: If this only has to work for classes created for the purpose (rather than for an arbitrary class): Certainly a step into the direction I meant - but still missing type declarations. And that's what at least I'd like to see - as otherwise you don't know w

RE: Class introspection and dynamically determining function arguments

2005-01-21 Thread Diez B. Roggisch
> The classes I'm dealing with do have attributes since they're > C-Extension types with attributes provided in the "tp_getset" slot. So > this is one case where I can query the class for attributes without > having to create an instance. Thanks for making me think of that, since > looking in the c

RE: Class introspection and dynamically determining function arguments

2005-01-21 Thread Mark English
> From: "Mark English" <[EMAIL PROTECTED]> > > I'd like to write a Tkinter app which, given a class, pops up a > window(s) with fields for each "attribute" of that class. The > user could enter values for the attributes and on closing the > window would be returned an instance of the class. The

Re: Class introspection and dynamically determining function arguments

2005-01-20 Thread Diez B. Roggisch
Nick Coghlan wrote: > > If this only has to work for classes created for the purpose (rather than > for an arbitrary class): > Certainly a step into the direction I meant - but still missing type declarations. And that's what at least I'd like to see - as otherwise you don't know what kind of ed

Re: Class introspection and dynamically determining function arguments

2005-01-20 Thread Nick Coghlan
Diez B. Roggisch wrote: Mark English wrote: As youself already mentioned that maybe you have to impose certain prerequisites, you maybe want to extend this to the point where for each class you want to make dynamically instantiatable you need some declaration. This of course depends on your desired

Re: Class introspection and dynamically determining function arguments

2005-01-20 Thread Diez B. Roggisch
Mark English wrote: > The only way I can imagine to do this is to create an instance of the > class in question, and then start poking around in its attributes > dictionary (initially just using dir). So firstly, if there is instead a > way to do this without creating an instance I'd be interested