def read_ids(filename): try: with open(filename) as f: return [int(id) for id in f.read().split()] except IOError as e: six.print_("Can't read the file", filename) exit(1)