i have a directory that i want to organize into seperate *.py files. and i want all the contained functions and classes of these seperate files to be available in a single, top level namespace within the python script editor without importing each file/module individualy.
..the result would be that i do not always have to 'import' each one manually in the script editor, and i do not have to type long "moduleName.functionName(args)" all the time as well.
in my userSetup.py i just want to do somthing like:
from "thisdirectory" import *
(vs. from "this.py" import *)
or
for f in getfilesIndir()
so that all functions are neatly organized in seperate files on disk, yet in the python command interperter inside the maya script editor, the functions are just there without long command calls and lots of manual importing.
i tried writing a def that would get all the files in the directory and do this but python complains saying this is not allowed with import functions.
what is the solution for not having to type the "filename"."functionname()" all the time in the script editor?
and at the same time, what is the solution for not having to "import filename" for every individual .py in a directory?
-thanks
-mt