def path_to_datatype_name(path):
    if path=="/":
        # No way to tell, although "INDEX" is likely
        return "TYPE='unknown'"
    else:
        return type_to_name(path[1])

# The following functions interpret the data returned by the gopher
# server according to the expected type, e.g. textfile or directory
Takes a path as returned by urlparse and maps it to a string.
dataset/ETHPy150Open babble/babble/include/jython/Lib/gopherlib.py/path_to_datatype_name