calling class methods from class methods, help?
rolf.oltmans at gmail.com
Wed Mar 11 18:08:34 CET 2009
I've a multithreaded program in which I've to call class methods from
class methods. Here is how my code look like (excluding imports),. Any
help is highly appreciated.
def __init__(self, times):
for i in range(0,self.times):
for site in sites:
self.name = site
self.html=SendRequest() # This line throws an error
def SendRequest(self): #A class method
# it sends a request to website using mechanize library
for i in range (0,reqs):
for thread in threads:
#I want to create 2 threads, each of them will execute twice. At
least that is the intention.
More information about the Python-list