Files
douyi_guaji_main/scripts/inspect_lines.py
T
Your Name 95b4517bdd feat: Enhance logging and parameter tracking capabilities
- Refactor `gui_core.py` to improve code readability and maintainability by adding line breaks for long statements.
- Introduce `inspect_lines.py` script for inspecting specific line ranges in files.
- Add `generate_param_locations.py` to scan the repository and generate a report of function definitions, argparse parameters, and tracking calls.
- Implement `param_usage_tool.py` for analyzing `param_usage.json` records and scanning code for tracking calls.
- Create `simulate_reservation_preempted_flow.py` and `simulate_reservation_preempted_flow_dynamic.py` to validate behavior of reservation logic under specific conditions.
- Add global parameter tracking feature in `run_cli.py` to enable detailed usage tracing.
2026-01-03 19:12:58 +08:00

13 lines
339 B
Python

import sys
path = sys.argv[1]
start = int(sys.argv[2])
end = int(sys.argv[3])
with open(path, 'r', encoding='utf-8') as f:
lines = f.readlines()
for i in range(start, end+1):
idx = i-1
if 0 <= idx < len(lines):
line = lines[idx].rstrip('\n')
print(f"{i:4}: {line}")
print(' repr:', repr(lines[idx]))