def modulePaths(name): parts = name.split("/") if len(parts) == 2: return (name, parts[1]) else: module = name if name[-1] == "X": module = name[:-1] return (name, module)