Re: threads/sockets quick question.
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 -- http://mail.python.org/mailman/listinfo/python-list
Re: SMTP Test Rig ( SMTPRIG.PY v1.0 )
Tim Williams wrote: After a few posts recently, I have put together an SMTP test rig that will receive emails and either store them to a file, write them to a console, or both. Sounds interesting. Does anyone have any suggestions on where I can get it hosted as a utility for general public use? You could upload it to the Vaults of Parnassus. http://www.vex.net/parnassus/ TIA Tim Christian http://www.dowski.com -- http://mail.python.org/mailman/listinfo/python-list
Re: How do I know when a thread quits?
I'm no threads expert, but if you use the higher-level threading module, you could try something like this: import threading import time def countToTen(): for i in range(1,11): print i time.sleep(0.5) child = threading.Thread(target=countToTen) class masterThread(threading.Thread): def run(self): print Master Started child.start() while child.isAlive(): time.sleep(0.1) print Master Finished master = masterThread() master.start() ---SCRIPT OUTPUT-- Master Started 1 2 3 4 5 6 7 8 9 10 Master Finished Hope this helps. Christian http://www.dowski.com -- http://mail.python.org/mailman/listinfo/python-list
Re: Web framework
Gianluca Sartori wrote: Hi guys, What web framework do you suggest to develop with? I really like CherryPy. It has a very intuitive design. A directory is an object and the files in it are methods. URL variables are passed as arguments to the methods. The CherryPy site has a good tutorial and some examples that should get you up and running fairly quickly. http://www.cherrypy.org Thanks for any suggestion, Gianluca Hope this helps. Christian -- http://mail.python.org/mailman/listinfo/python-list