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
Post a Comment