### Function relpath - Return the relative path from directory 'path1' to directory 'path2'

## SYNOPSIS

    import HTMLgen

    def relpath(path1, path2)

## DESCRIPTION

Both arguments are assumed to be directory names as there is no way to really distinguish a file from a directory by names alone. To loosen this restriction one can either assume that both arguments represent files or directories currently extant so that they can be tested, or add extra arguments to flag the path types (file or directory).

I chose to impose this restriction because I will use this function in places where the pathnames are for files yet to be created.

## SEE ALSO

HTMLgen

Copyright © Robin Friedrich
All Rights Reserved
Comments to author: friedrich@pythonpros.com
Generated: Tue Apr 20, 1999