Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

#19 path magic doesn't work

v1.1
closed-fixed
Edward Loper
5
2003-06-20
2003-04-29
Richard Gruet
No

In epydoc.py, line 12:

sys.path = [d for d in sys.path if os.path.abspath(d)
!= cwd]

is supposed to remove from the Python Path the
directory of the epydoc.py script itself, so it is not
confused with the epydoc package.

Unfortunately the code makes the assumption that the
current directory (cwd) is those of the script. It
won't work if it is not the case.

Suggested Solution:
Since sys.path[0] gives the directory of the script
while it is executed, it is enough to remove this first
element from sys.path => replace line 12 with:

del sys.path[0]

It works for me, at least.

Richard Gruet

Discussion

  • Edward Loper
    Edward Loper
    2003-06-20

    • milestone: --> v1.1
    • status: open --> closed-fixed