How can I execute a function from a separate script? I have two objects and two python scripts: each object has a python script. Both python scripts contain a basic function that is different from the other script's function. This is all simple. However, since I have the two functions in separate python scripts, I cannot execute them as I do not know how to do so.

I have tried using the messaging mechanic from the Game Engine itself, but that is too slow, as it takes at least one tick. I would like a faster way, if possible.

How can I do this?
You can just import the second file from the first and then call it's functions.

Imagine you have two scripts, foo and bar, stored in foo.py and bar.py, respectively; the script bar has a function which you want to call from the script foo. All you need to dois import bar at the start of foo and then call it's function, as in this example:

#File bar.py
def test():
    print("Hello, World!")


#File foo.py
import bar

bar.test() #Outputs "Hello, World!" to the console