heapq apparently worked the first time I tested it.