Before you claim as a duplicate
I have looked at the following:
python function call with variable
Calling a function of a module from a string with the function's name
Executing a function by variable name in Python
https://ubuntuforums.org/showthread.php?t=1110989
and much more, but no luck.
I am developing a game. Right now I am working on the SAVE/LOAD feature, but I am getting nowhere.
I want to take a piece of text from another py or txt file and have my main py file read that, and call a function depending on the string of text in the second file.
Script1:
#imports
from script2 import SaveCode
#Code
def Test():
print('Hello, World!')
callable(SaveCode)
Script2:
SaveCode = Test()
This won't work. Can someone please help me?