(input_path, output_path)
| 63 | |
| 64 | |
| 65 | def copy4(input_path, output_path): |
| 66 | print(f"copying data from {input_path} to {output_path}...") |
| 67 | input_file = tb.open_file(input_path, mode="r") |
| 68 | output_file = tb.open_file(output_path, mode="w", filters=filters) |
| 69 | |
| 70 | input_table = input_file.root.test |
| 71 | print("reading data...", end=" ") |
| 72 | start = clock() |
| 73 | data = input_file.root.test.read() |
| 74 | print(f"{clock() - start:.3f}s elapsed.") |
| 75 | print("done.") |
| 76 | |
| 77 | output_table = output_file.create_table("/", "test", input_table.dtype) |
| 78 | print("appending data...", end=" ") |
| 79 | start = clock() |
| 80 | output_table.append(data) |
| 81 | print("flushing...", end=" ") |
| 82 | output_table.flush() |
| 83 | print(f"{clock() - start:.3f}s elapsed.") |
| 84 | print("done.") |
| 85 | |
| 86 | input_file.close() |
| 87 | output_file.close() |
| 88 | |
| 89 | |
| 90 | def copy5(input_path, output_path): |
nothing calls this directly
no test coverage detected