great help, and great link, thanks again.
shawn

On 12/30/06, Kent Johnson <[EMAIL PROTECTED]> wrote:

shawn bright wrote:
> Kent, Thanks.
> this is great. Yes, when i start the thread, i also pass the gtk object
> to it.
> kinda like this.
>
> serial_1 = Serial1(self.serial_1_buffer, self.serial_1_view)
> serial_1.start()
>
> so i am wanting to change that, but i do not exactly know how to stop a
> thread once i have it running, so that i could start another one.

The usual way to stop a thread is to set a flag that the thread checks.
Here is an example using a threading.Event as a flag:
http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/65448

> anyway, thanks for the link and the info, i am going to get started on
> testing this right away. This long a .py script is becomming a headache
> and i think it will be easier by far if it is pulled apart somewhat.

Yes, 4000 lines is pretty long for one file IMO.

Kent



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

Reply via email to