Blaise, This patch works for me. You may want to put additional checks in there, for example making sure that the path being added is not a directory. --Nick Index: gendeps =================================================================== --- gendeps (revision 31915) +++ gendeps (working copy) @@ -73,6 +73,9 @@ if not m in start_modules: try: file = inspect.getsourcefile(end_modules[m]) + if not os.path.exists(file): + while not os.path.exists(file): + file = os.path.dirname(file) if type(file) == str: print >> stdout, file except Exception, e: