Re: [Tutor] temporarily modifying sys.path

2010-11-29 Thread Alan Gauld
"Steven D'Aprano" wrote I think its new in Python v3... Nah, it's been around forever: [st...@sylar ~]$ python1.5 Wow, I've never even noticed it before, let alone used it... Its amazing what that battery pack contains :-) Alan G ___ Tutor

Re: [Tutor] temporarily modifying sys.path

2010-11-29 Thread Steven D'Aprano
Alan Gauld wrote: "Tim Johnson" wrote Just curious, but could the imp module help you? imp.find_module I'll be darned. I never even heard of that module, but I just did an import and looked at the docs. I *will* give that a try. I think its new in Python v3... Nah, it's been around f

Re: [Tutor] temporarily modifying sys.path

2010-11-28 Thread Tim Johnson
* Alan Gauld [101128 15:17]: > > "Tim Johnson" wrote > >>> Just curious, but could the imp module help you? imp.find_module > >> I'll be darned. I never even heard of that module, but I just >> did an import and looked at the docs. I *will* give that a try. > > I think its new in Python v3...

Re: [Tutor] temporarily modifying sys.path

2010-11-28 Thread Alan Gauld
"Tim Johnson" wrote Just curious, but could the imp module help you? imp.find_module I'll be darned. I never even heard of that module, but I just did an import and looked at the docs. I *will* give that a try. I think its new in Python v3... Compare my recent post about reload() - now

Re: [Tutor] temporarily modifying sys.path

2010-11-28 Thread Tim Johnson
* Evert Rol [101128 07:56]: > > I need a function that will import a module (using __import__) from > > only one specific location on my filesystem. Name collisions are > > possible. To avoid this I could *temporarily* modify sys.path for > > the operation so that it contains only the path that I

Re: [Tutor] temporarily modifying sys.path

2010-11-28 Thread Evert Rol
> I need a function that will import a module (using __import__) from > only one specific location on my filesystem. Name collisions are > possible. To avoid this I could *temporarily* modify sys.path for > the operation so that it contains only the path that I want > to work from. Just curious, b

[Tutor] temporarily modifying sys.path

2010-11-28 Thread Tim Johnson
I need a function that will import a module (using __import__) from only one specific location on my filesystem. Name collisions are possible. To avoid this I could *temporarily* modify sys.path for the operation so that it contains only the path that I want to work from. console example: >>> sys_