Is it bad practice to execute a script execfile(XX.py), rather than import XX as a module? The reason I'm interested, is that executing the file puts the functions directly into __main__, and then globals are available without needing to explicitly pass them. But, I'm not sure if this creates trouble... Thanks!
Yes, it's bad practice, for the very reason that everything ends up in __main__. If you have two modules which have any variable with the same name, one will overwrite the other.
Importing Modules vs. Executing Scripts for Global Variables