def nameAndVersion(aString):
    for delim in ('--', '-'):
        if aString.count(delim) > 0:
            chunks = aString.split(delim)
            vers = chunks.pop()
            name = delim.join(chunks)
            if vers[0] in '0123456789':
                return (name, vers)

    return (aString, '')
Builds an OSM graph based on a filename or filehandle.  Projection is used for calculating lengths.
dataset/ETHPy150Open munki/munki/code/client/munkilib/updatecheck.py/nameAndVersion--crossover with--dataset/ETHPy150Open bmander/graphserver/pygs/graphserver/ext/osm/graph.py/OSMGraph.__init__