I'm trying to make a python program for a given software than will scan&run another certain python function at choice (or .py file altogether). However I can't import
a function name set in a variable.
import glob
functions_list = glob.glob('*.py')
#all my python files are found
#pick any specific file to import
import a[3]
This fails with SyntaxError: invalid syntax
.
Is there any way to do this? My idea is to have a TkInter selection list where I click to run the .py I selected.