def get_path(self, first_node, last_node, **options):
    'Returns the first path found between first node and last node, uses a breadth first search algorithm'
    defaults = {'debug': False, 'method': 'BreathFirst'}
    self.get_path_options = {}
    for (key, value) in defaults.items():
        self.get_path_options[key] = value
    for (key, value) in options.items():
        self.get_path_options[key] = value
    unvisited_nodes = self.node_names[:]
    unvisited_nodes.remove(first_node)
    visited_nodes = [first_node]
    node_history = []
    edge_history = []
    path_queue = []
    possible_paths = []
    queue = []
    current_edge = []
    queue.append(first_node)
    path = {first_node: []}
    while queue:
        current_node = queue.pop(0)
        if (path_queue != []):
            current_edge = path_queue.pop(0)
            edge_history.append(current_edge)
        node_history.append(current_node)
        if self.get_path_options['debug']:
            print('current_node is {0}'.format(current_node))
            print('current_edge is {0}'.format(current_edge))
        if (current_node == last_node):
            if self.get_path_options['debug']:
                print('Node path was found to be {0}'.format(node_path))
                print('path was found to be {0}'.format(edge_path))
                print('{0} is {1}'.format('path', path))
            return path[last_node][::(- 1)]
        adjacent_nodes = self.get_exiting_nodes(current_node)
        adjacent_paths = self.get_exiting_edges(current_node)
        if self.get_path_options['debug']:
            print('{0} are {1}'.format('adjacent_nodes', adjacent_nodes))
            print('{0} are {1}'.format('adjacent_paths', adjacent_paths))
        current_history = edge_history
        for (node_index, node) in enumerate(adjacent_nodes):
            if (node not in visited_nodes):
                queue.append(node)
                path_queue.append(adjacent_paths[node_index])
                visited_nodes.append(node)
                path[node] = ([adjacent_paths[node_index]] + path[current_node])
                path[node]
                if self.get_path_options['debug']:
                    print('{0} is {1}'.format('path_queue', path_queue))
Returns the first path found between first node and last node, uses a breadth first search algorithm
def get_path(self, first_node, last_node, **options):
    
    defaults = {'debug': False, 'method': 'BreathFirst'}
    self.get_path_options = {}
    for (key, value) in defaults.items():
        self.get_path_options[key] = value
    for (key, value) in options.items():
        self.get_path_options[key] = value
    unvisited_nodes = self.node_names[:]
    unvisited_nodes.remove(first_node)
    visited_nodes = [first_node]
    node_history = []
    edge_history = []
    path_queue = []
    possible_paths = []
    queue = []
    current_edge = []
    queue.append(first_node)
    path = {first_node: []}
    while queue:
        current_node = queue.pop(0)
        if (path_queue != []):
            current_edge = path_queue.pop(0)
            edge_history.append(current_edge)
        node_history.append(current_node)
        if self.get_path_options['debug']:
            print('current_node is {0}'.format(current_node))
            print('current_edge is {0}'.format(current_edge))
        if (current_node == last_node):
            if self.get_path_options['debug']:
                print('Node path was found to be {0}'.format(node_path))
                print('path was found to be {0}'.format(edge_path))
                print('{0} is {1}'.format('path', path))
            return path[last_node][::(- 1)]
        adjacent_nodes = self.get_exiting_nodes(current_node)
        adjacent_paths = self.get_exiting_edges(current_node)
        if self.get_path_options['debug']:
            print('{0} are {1}'.format('adjacent_nodes', adjacent_nodes))
            print('{0} are {1}'.format('adjacent_paths', adjacent_paths))
        current_history = edge_history
        for (node_index, node) in enumerate(adjacent_nodes):
            if (node not in visited_nodes):
                queue.append(node)
                path_queue.append(adjacent_paths[node_index])
                visited_nodes.append(node)
                path[node] = ([adjacent_paths[node_index]] + path[current_node])
                path[node]
                if self.get_path_options['debug']:
                    print('{0} is {1}'.format('path_queue', path_queue))