I'm making a small script in python with ttk and I have a problem where a function runs where it shouldn't. The button code looks as follows:

btReload = ttk.Button(treeBottomUI, text="Reload", width=17, command=loadModelTree(treeModel))
btReload.pack(side="left")

and the function is as this:

def loadModelTree(tree):
    print ("Loading models...")
    allModels = os.listdir(confModPath)
    for chunk in allModels:
        ...

For some reason, the function runs without the button being pressed. Why?
Markus, yes, that's the right solution, but it is not because you can't use multi-argument commands in widget callouts. Consider, in your original code, ...command=loadModelTree(treeModel)... is an invocation of the method. Lambda allows you to abstract the command so you can have an arbitrary number of arguments without confusing the interpreter by invoking it, e.g., ...command=lambda arg1=myarg1, arg2=myarg2, arg3=myarg3: myCallout(arg1, arg2, arg3)....
I hope that makes what is going on a bit clearer.
Python ttk.Button -command, runs without button being pressed