how to avoid infinite loop in python?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • msri
    New Member
    • May 2012
    • 1

    how to avoid infinite loop in python?

    i want to kill a sub process which is going into infinite loop..
  • eGrove Systems
    New Member
    • Dec 2012
    • 6

    #2
    Execute conditional if statement to avoid infinite for loop execution below small example.

    example:

    for i in l:

    if somecondition:
    break

    Comment

    • maya29988
      New Member
      • May 2014
      • 7

      #3
      kill it by providing the process id.
      Each subprocess will have its own process id. Check for that pid and kill it.

      Comment

      Working...