RE: python2.7 kill thread and find thread id

2012-01-03 Thread Yang Chun-Kai
Sorry for the misarrangement of my code in list, it happens everytime. I apologized. From: waitmefore...@hotmail.com To: python-list@python.org Subject: python2.7 kill thread and find thread id Date: Wed, 4 Jan 2012 14:10:46 +0800 Hello,guys!! I am using python2.7 to write a simple thread

python2.7 kill thread and find thread id

2012-01-03 Thread Yang Chun-Kai
Hello,guys!! I am using python2.7 to write a simple thread program which print the current running thread id and kill it with this id. But I have some questions with this. My code: -from threading import Threadclass t(Thread): def __init__(

Re: kill thread

2008-08-09 Thread Mathieu Prevot
2008/8/8 <[EMAIL PROTECTED]>: > On 8 Ago, 10:03, "Mathieu Prevot" <[EMAIL PROTECTED]> wrote: >> 2008/8/8 Miki <[EMAIL PROTECTED]>: >> >> > Hello, >> >> >> I have a threading.Thread class with a "for i in range(1,50)" loop >> >> within. When it runs and I do ^C, I have the error [1] as many as >> >

Re: kill thread

2008-08-08 Thread bockman
On 8 Ago, 10:03, "Mathieu Prevot" <[EMAIL PROTECTED]> wrote: > 2008/8/8 Miki <[EMAIL PROTECTED]>: > > > Hello, > > >> I have a threading.Thread class with a "for i in range(1,50)" loop > >> within. When it runs and I do ^C, I have the error [1] as many as > >> loops. I would like to catch this exce

Re: kill thread

2008-08-08 Thread Mathieu Prevot
2008/8/8 Miki <[EMAIL PROTECTED]>: > Hello, > >> I have a threading.Thread class with a "for i in range(1,50)" loop >> within. When it runs and I do ^C, I have the error [1] as many as >> loops. I would like to catch this exception (and if possible do some >> cleanup like in C pthreads) so the prog

Re: kill thread

2008-08-07 Thread Miki
Hello, > I have a threading.Thread class with a "for i in range(1,50)" loop > within. When it runs and I do ^C, I have the error [1] as many as > loops. I would like to catch this exception (and if possible do some > cleanup like in C pthreads) so the program finishes cleanly. Where and > how can

kill thread

2008-08-07 Thread Mathieu Prevot
Hi, I have a threading.Thread class with a "for i in range(1,50)" loop within. When it runs and I do ^C, I have the error [1] as many as loops. I would like to catch this exception (and if possible do some cleanup like in C pthreads) so the program finishes cleanly. Where and how can I do this ? i

Re: Kill thread or at least socket.getaddrinfo

2007-04-10 Thread Chris Mellon
On 10 Apr 2007 11:07:51 -0700, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > On 26 Mar., 18:08, [EMAIL PROTECTED] wrote: > > you know the pid, you can kill it, but that's not always a > > clean way of accomplishing the task. > > So I have to open the connection in a new process... Sigh.. How I hat

Re: Kill thread or at least socket.getaddrinfo

2007-04-10 Thread [EMAIL PROTECTED]
On 26 Mar., 18:08, [EMAIL PROTECTED] wrote: > you know the pid, you can kill it, but that's not always a > clean way of accomplishing the task. So I have to open the connection in a new process... Sigh.. How I hate this part of Python. -- http://mail.python.org/mailman/listinfo/python-list

Re: Kill thread

2007-04-09 Thread Gabriel Genellina
En Mon, 09 Apr 2007 06:14:26 -0300, Teja <[EMAIL PROTECTED]> escribió: > Can any on help me out in killing a thread (i.e deleteing the reources > like, stack ,memory etc) which is started with > win32process.beginthreadex()??? As you can read on: http://msdn2.microsoft.com/en-us/library/kdzttdcb(

Re: Kill thread

2007-04-09 Thread Teja
On Apr 9, 6:18 pm, "Christian" <[EMAIL PROTECTED]> wrote: > On Apr 9, 5:14 am, "Teja" <[EMAIL PROTECTED]> wrote: > > > Hi all, > > > Can any on help me out in killing a thread (i.e deleteing the reources > > like, stack ,memory etc) which is started with > > win32process.beginthreadex()??? > > > Ri

Re: Kill thread

2007-04-09 Thread Christian
On Apr 9, 5:14 am, "Teja" <[EMAIL PROTECTED]> wrote: > Hi all, > > Can any on help me out in killing a thread (i.e deleteing the reources > like, stack ,memory etc) which is started with > win32process.beginthreadex()??? > > Rite now, I am suspending the thread. But any pointers as to how to > dele

Re: Kill thread

2007-04-09 Thread Teja
On Apr 9, 3:01 pm, Michel Claveau <[EMAIL PROTECTED]> wrote: > Hi! > > If you have the PID of the process (example: 1234), use this > command-line : >TASKKILL/F /PID 1234 > > -- > @-salutations > > Michel Claveau Hi Michel, Thnks for the replyBut TASKKILL kills the process entirely..N

Re: Kill thread

2007-04-09 Thread Michel Claveau
Hi! If you have the PID of the process (example: 1234), use this command-line : TASKKILL /F /PID 1234 -- @-salutations Michel Claveau -- http://mail.python.org/mailman/listinfo/python-list

Kill thread

2007-04-09 Thread Teja
Hi all, Can any on help me out in killing a thread (i.e deleteing the reources like, stack ,memory etc) which is started with win32process.beginthreadex()??? Rite now, I am suspending the thread. But any pointers as to how to delete the thread permanently? Its pretty urgent... Please... Teja.P

Re: Kill thread or at least socket.getaddrinfo

2007-03-26 Thread kyosohma
On Mar 26, 10:53 am, Thomas Dybdahl Ahle <[EMAIL PROTECTED]> wrote: > Hi, I'm writing an application that connects to the internet. > Something like this: > > for res in socket.getaddrinfo(host, port, 0, socket.SOCK_STREAM): > af, socktype, proto, canonname, sa = res > try: > self.s

Kill thread or at least socket.getaddrinfo

2007-03-26 Thread Thomas Dybdahl Ahle
Hi, I'm writing an application that connects to the internet. Something like this: for res in socket.getaddrinfo(host, port, 0, socket.SOCK_STREAM): af, socktype, proto, canonname, sa = res try: self.sock = socket.socket(af, socktype, proto) Now if the user press the cancel button