table (1) 썸네일형 리스트형 [python] mysql 백업파일에서 특정 테이블 부분만 별도로 저장하기 import reimport argparsedef extract_table_data(input_file, output_file, table_name): with open(input_file, 'r', encoding='utf-8') as infile, open(output_file, 'w', encoding='utf-8') as outfile: in_table = False table_content = [] for line in infile: if line.strip().startswith(f"DROP TABLE IF EXISTS `{table_name}`"): in_table = True .. 이전 1 다음