Re: Something like the getattr() trick.

2007-02-10 Thread Gabriel Genellina
On 2/10/07, Ayaz Ahmed Khan <[EMAIL PROTECTED]> wrote: >> class Vuln: >> >> class VulnInfo(Vuln): >> >> class VulnDiscuss(Vuln): >> >> def main(url): >> vuln_class = ['Info', 'Discuss'] >> vuln = Vuln(url) >> vuln._parse() >> for link in vuln.get_link(): >>

Re: Something like the getattr() trick.

2007-02-10 Thread Calvin Spealman
vuln = Vuln(url) > vuln._parse() > for link in vuln.get_link(): > i = VulnInfo(link) > i._parse() > d = VulnDiscuss(link) > d._parse() > > > Is there a way to get references to VulnInfo and VulnDis

Re: Something like the getattr() trick.

2007-02-10 Thread faulkner
vuln = Vuln(url) > vuln._parse() > for link in vuln.get_link(): > i = VulnInfo(link) > i._parse() > d = VulnDiscuss(link) > d._parse() > > Is there a way to get references to VulnInfo and V

Something like the getattr() trick.

2007-02-10 Thread Ayaz Ahmed Khan
d = VulnDiscuss(link) d._parse() Is there a way to get references to VulnInfo and VulnDiscuss objects using something like the getattr trick? For example, something like: for _class in vuln_class: class_obj = getattr('Vuln%s' % (_class,