Python’s imp module is a bit of a bear, but thanks to the groundwork in this thread, I got it straitened out. Here’s some lightly tested sample code.
import imp
# the path variable is optional, but possibly necessary
tmp = imp.find_module("module", ["relative/path", "/absolute/path"])
try:
# the names of the two constants do not seem to matter
module = imp.load_module("name", tmp[0], "path", tmp[2])
finally:
tmp[0].close()
module.thing