title: Start python execution flow from where it got stopped
body: <p>I have below two input file examples:</p>
  
  <pre><code>case1:
  
  one-device:yes
  number of device:01-05
  first-device:
  second-device:
  
  Case2:
  one-device:no
  number of device:01-05
  first-device:01-02
  second-device:03-03
  third-device:04-05
  </code></pre>
  
  <p>Now in case 1 i have only one start and end value that is 01 and 05</p>
  
  <p>Functions I have is func1 to func13 . I have provided two examples  </p>
  
  <pre><code>def func1(self, start, end):
       for i, x in enumerate (range(start, end)):
           do something
  def func10 (self, start, end):
           do something
  
  if one-device == yes: # execute func1 one time. 
      func1(arg1, agr2)
  
  # if one-device no i need to run 3 times 
  if one-device == no:
      for x in (1, 4)
          func1(star, end) # just example start and end values will changes as per inputs in this example i just defined them start end value
  func2(arg1, agr2)
  func3(arg1, agr2)
  func4(arg1, agr2)
  func5(arg1, agr2)
  func6(arg1, agr2)
  func7(arg1, agr2)
  func8(arg1)
  func9(arg1, agr2,arg3)
  func10(agr1,arg2)
  func11(arg1, agr2)
  func12(arg1, agr2)
  func13(arg1) 
  </code></pre>
  
  <p>Now program execution is stopped for some reasons in case2  input example .</p>
  
  <p>It got executed one time <code>func1</code> and stopped.</p>
  
  <p>Now I need to provide option to user to start execution from where it got stopped.</p>
  
  <p>Users knows where it got stopped.</p>
  
  <p>I will provide options like this:</p>
  
  <pre><code>list1 = ['func1','func2','func3',.......'func13'] # list1 example
  
  for x, y in zip(range(1, 14), list1):
      print "{}. {}".format(x, y)
  input_select = raw_input("choose options")
  
  if input_select == '1':
      list2 = ['first_device_func1', 'second_device_func1', 'third_device_func1']
      for  x, y in zip(range(1, 4), list2):
          print "{}. {}".format(x, y)
      input_select_func1 = raw_input("Choose fun from it will start")
  </code></pre>
  
  <p>In above example user selected <code>func1</code>, and then again he selected <code>2</code>.</p>
  
  <p>Now my program execution must be start from user input.</p>
  
  <p>Please help, as previous I have confused all so I came with input and output expected. Hope this time it will be clear.</p>