python - Execute function identified by name -


i'd run function identified string.

torun = 'testfunction'  def testfunction():     log.info('in function');  run(torun) 

where run whatever command need use. i've tried exec/eval without luck.

locals returns dict containing references in current scope

locals()[torun]() 

Comments

Popular posts from this blog

javascript - Google App Script ContentService downloadAsFile not working -

javascript - IIFE: var vs this - is there any difference? -

r - Grow a ffdf data frame on disk gradually -