By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
464,609 Members | 1,164 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 464,609 IT Pros & Developers. It's quick & easy.

how to avoid infinite loop in python?

P: 1
i want to kill a sub process which is going into infinite loop..
May 10 '12 #1
Share this Question
Share on Google+
2 Replies

P: 6
Execute conditional if statement to avoid infinite for loop execution below small example.


for i in l:

if somecondition:
Dec 14 '12 #2

P: 7
kill it by providing the process id.
Each subprocess will have its own process id. Check for that pid and kill it.
May 2 '14 #3

Post your reply

Sign in to post your reply or Sign up for a free account.