def export_csv_file(name, kind, action=None): from ghost_spider.util import LocationCsv, SalonToCsvFiles if kind == 'hotel': LocationCsv.dump_hotel(name, action=action) elif kind == 'restaurant': LocationCsv.dump_restaurant(name, action=action) elif kind == 'salon': file_generator = SalonToCsvFiles(name) file_generator.dump(action=action) else: NotImplementedError()