I've been learning to program with Python on and off for a while now, and my current project is a download manager with a GUI written in wxPython. I have DownloadThreads, inheriting from threading.Thread, that I instantiate a varying amount of:
for i in xrange(self.thread_count):
DownloadThread(self.queue, self.status, self.save_dir, i).start()
Because the number of threads I'm going to be creating isn't fixed, I can't assign the DownloadThread objects to variables, so I can't see how to access their methods, such as x.isAlive(). I thought about dynamically creating variables, but something about this seems like a really bad idea. How would I go about accessing these "anonymous" objects (terminology?), or am I going about this the wrong way? Thanks for reading, apologies if this is really simple / obvious.