On Apr 25, 11:37 pm, Paul wrote:
> Hi
>
> It seems in 2.6 you are no longer able to use the __import__ function
> with different paths.
I did not study your code in detail, so I may have missed something,
but can't you use the 'imp' module for this? That still works in 2.6,
and seems to be presen
On Apr 25, 2:37 pm, Paul wrote:
> It seems in 2.6 you are no longer able to use the __import__ function
> with different paths.
That functionality was deliberately removed, since it was never
intended to be present in the first place, and it only "worked" before
by accident. To get that behavior
Paul wrote:
Hi
It seems in 2.6 you are no longer able to use the __import__ function
with different paths. Here is our code:
sys.path = g.origSysPath[:] # copy, not reference
sys.path.insert(0, modulePath)
sys.modules = g.origSysModules.copy()
We found a quick workaround to make import work with paths. We just
append the folder we want to the system's path:
sys.path.append( moduleFolder )
If anyone has a better solution, that would be great. Until then, this
is ugly, but it works.
--
http://mail.python.org/mailman/listi