linking py files

Hello, i have a basic question.

I have an interface with my buttons on a py file. My 3d world is on another py file. Is there a command to place in the function, that executes while pressing a button, on the interface to jump between the files?

Or is this the correct way of doing it? Else what is the best method. For example… on my interface i have a button for “help”. should i link the other file containing the text for it or is it better to have them all in a single file and just linking the functions?

I think I understand what you’re saying.

You want to call functions from one file in another file.

If so, just import the file. I’m pretty sure I’m right.

something like:


I’m not sure what the asterisk does, but I see people using:

from import *

not sure if you need to include .py extension.

YEah… i have been able to find out how to do it… but when u use import… the other module load directly… it needs to be prevented by the use of some global variables and if conditions… am working on that

thanks anyways

if __name__ == '__main__':
    # do module stuff