calling class methods from class methods, help?

Piet van Oostrum piet at
Wed Mar 11 19:00:04 CET 2009

>>>>> Oltmans <rolf.oltmans at> (O) escribió:

>O> I've a multithreaded program in which I've to call class methods from
>O> class methods. Here is how my code look like (excluding imports),. Any
>O> help is highly appreciated.

>O> #!/usr/bin/env python
>O> class Requests(Thread):

>O>     def __init__(self, times):
>O>         Thread.__init__(self)
>O>         self.times=times
>O>     def run(self):

>O>         sites=['','']
>O>         for i in range(0,self.times):
>O>             for site in sites:
>O>        = site
>O>                 self.html=SendRequest() # This line throws an error

Piet van Oostrum <piet at>
URL: [PGP 8DAE142BE17999C4]
Private email: piet at

More information about the Python-list mailing list