Quickies

[categories] [index] [all (531)] [latest]

Python
  1. import my_module
    f = getattr(my_module, 'my_function')
    result = f()
    

    or

    globals()["my_function"]()
    

    or

    locals()["my_function"]()