module import search path strangeness
Sion Arrowsmith
siona at chiark.greenend.org.uk
Tue Aug 12 12:50:29 EDT 2008
Peter Otten <__peter__ at web.de> wrote:
>tow wrote:
>> sys.path.append(os.path.join(project_directory, os.pardir))
>> project_module = __import__(project_name, {}, {}, [''])
>> sys.path.pop()
>Ouch.
I presume that "Ouch" is in consideration of what might happen if
the subject of the __import__ also calls sys.path.append ...?
--
\S -- siona at chiark.greenend.org.uk -- http://www.chaos.org.uk/~sion/
"Frankly I have no feelings towards penguins one way or the other"
-- Arthur C. Clarke
her nu becomeþ se bera eadward ofdun hlæddre heafdes bæce bump bump bump
More information about the Python-list
mailing list