threads/sockets quick question.

dowskimania at gmail.com dowskimania at gmail.com
Mon Sep 19 11:58:05 EDT 2005


ed wrote:
> this script should create individual threads to scan a range of IP
> addresses, but it doesnt, it simple ... does nothing. it doesnt hang
> over anything, the thread is not being executed, any ideas anyone?

[SNIP]

>             while threading < MAX_THREADS:
>                 scanThread().start()

In an interactive interpreter:

>>> import threading
>>> MAX_THREADS = 50
>>> threading < MAX_THREADS
False

Since that tests as False, your code never enters the loop's body.

Christian
http://www.dowski.com




More information about the Python-list mailing list