What I have not seen before: You're modifying the sys.path list.
Don't do this. Put all your python files into a directory and put an empty __init__.py file into this directory.
Then you can do:
The .py extension is not used. Please read more about the import system, before you try
to invent your own stuff.
If you put the names (of the functions) in the list, the functions have to be imported or defined.
You can also import functions from other modules and put them afterwards in a list.
But the order is always: Assign an object to a name, then you can access with name the object.
You should refactor the names and the places.
For example you can make a module called make.
All functions inside the make module, does not contain the name make.
You should have something like this:
Don't do this. Put all your python files into a directory and put an empty __init__.py file into this directory.
Then you can do:
import directory_name.module_nameThe module_name is in this case the python file, you want to access in this directory.
The .py extension is not used. Please read more about the import system, before you try
to invent your own stuff.
If you put the names (of the functions) in the list, the functions have to be imported or defined.
def function1(): return 42 def function2(): return 1337 # then you can create the list, with the function objects inside. my_funcs = [function1, function2] # iteratring over functions, print the name, call it for func in my_funcs: name = func.__name__ print('Calling function:', name) result = func() print('Result:', result)If you put my_funcs from line 8 to line 1, you'll get a NameError. The function is not defined yet.
You can also import functions from other modules and put them afterwards in a list.
But the order is always: Assign an object to a name, then you can access with name the object.
You should refactor the names and the places.
For example you can make a module called make.
All functions inside the make module, does not contain the name make.
You should have something like this:
import make # functions from make make.br() make.a() make.img() make.table() make.tr() make.td()
Almost dead, but too lazy to die: https://sourceserver.info
All humans together. We don't need politicians!
All humans together. We don't need politicians!