Roy Smith wrote:
[snip]
It's reasonably straight-forward to figure out that absolute path, starting from sys.argv[0] and using the tools in os.path. Now I need to import the file, given that I know its absolute pathname. It looks like imp.load_source() does what I want, I'm just wondering if there's a cleaner way.

What about

config = __import__(configPath.replace('.py', ''))


JM

--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to