"Maximum recursion depth exceeded"...why?
"Martin v. Löwis"
martin at v.loewis.de
Tue Feb 17 23:05:42 CET 2009
Thomas Allen wrote:
> I must not be understanding something. This is a simple recursive
> function that prints all HTML files in argv as its scans the
> directory's contents. Why do I get a RuntimeError for recursion depth
> def main():
> absToRel(sys.argv, sys.argv)
> def absToRel(dir, root):
> for filename in os.listdir(dir):
> if os.path.isdir(filename):
Perhaps you have a symlink somewhere that makes the tree appear to
have infinite depth?
More information about the Python-list