[Tutor] question about importing threads

shawn bright nephish at gmail.com
Sat Dec 30 17:39:42 CET 2006


great help, and great link, thanks again.
shawn

On 12/30/06, Kent Johnson <kent37 at tds.net> 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
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/tutor/attachments/20061230/91925f07/attachment.html 


More information about the Tutor mailing list