with open(r'C:\ProgramData\Ableton\Live 12 Suite\Resources\MIDI Remote Scripts\abletonmcp_init.py', 'r', encoding='utf-8') as f:
    lines = f.readlines()

for i, l in enumerate(lines):
    if 'def _process_command(' in l:
        print(f"start: {i+1}")
    if 'def main_thread_task(' in l:
        print(f"end: {i+1}")
