Re: Any way to loop through object variables?

2008-05-29 Thread Dave Challis
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Ah thanks, vars(...) was exactly what I was after. I'd come across dir() before, but this returns more than I need. Thanks again, Dave Saju Pillai wrote: On 28-May-08, at 9:49 PM, Gary Herron wrote: Dave Challis wrote: Hi, Just wondering if

Re: Any way to loop through object variables?

2008-05-29 Thread paul
Dave Challis schrieb: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Ah thanks, vars(...) was exactly what I was after. I'd come across dir() before, but this returns more than I need. It seems vars() misses class attributes tho... cheers Paul --

Any way to loop through object variables?

2008-05-28 Thread Dave Challis
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi, Just wondering if there's a way to iterate through all variables which an object has set? Specifically, I'm using the OptionParser module, which returns an options object, containing all command line options as object variables. I'd like to

Re: Any way to loop through object variables?

2008-05-28 Thread Gary Herron
Dave Challis wrote: Hi, Just wondering if there's a way to iterate through all variables which an object has set? Specifically, I'm using the OptionParser module, which returns an options object, containing all command line options as object variables. I'd like to iterate over these rather

Re: Any way to loop through object variables?

2008-05-28 Thread Saju Pillai
On 28-May-08, at 9:49 PM, Gary Herron wrote: Dave Challis wrote: Hi, Just wondering if there's a way to iterate through all variables which an object has set? Specifically, I'm using the OptionParser module, which returns an options object, containing all command line options as object