> Here are the questions (-:
> 1. How do I make a progress bar in Tkinter ?

One option:
Use a set up gif images and update the image periodically
OR
Use a canvas and redraw a rectangle slightly larger every
time through the scanning loop.

The first is easiest the second smoother but much more work!

> 2. I got a while loop which does the port scan itself. How can I end
> it while its working ?

The best way is to have the loop running in a seperate thread
to the GUI and checking a flag on each iteration. Then you can
have a stop button on the GUI that sets the flag.
Its generally a bad idea in a GUI to have long running processes
within an event handler, better to put them in a separate thread.
Unfortunately this is a lesson that Microsoft's programmers don't
appear to have learned yet!

Alan G.

_______________________________________________
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor

Reply via email to