automation - Automatically call all functions matching a certain pattern in python -


I have several functions in Python that are given below. I would like to run all those functions that match the name setup _ * without having to explicitly call them. The order in which the work is going is not important. How can I do this in dragon?

  def setup_1 (): .... def setup_2 (): .... def setup_3 (): ... ... if __name__ = '__main__': setup _ * ()  

  def setup_1 (): print ('1') def Setup_2 (): print ('2') def settext_3 (): print ('3') if __name__ == '__main__': in func (wal for keys, wallets in wars) items () if key.startswith (' Setup_ ')): func ()  

yields

  # 1 # 3 # 2  

Comments