Interplane page as plain text, for reading tools and agents. English is the reference text: translate it with your own tool. Text in backticks and in ``` blocks (commands, fingerprints, file names) and link targets in <...> are exact: copy them, never translate them. Page: /drakestapleton/omega-bridge/blob/main/evidence/text-parent-verification/reproduce-text-view.py # omega-bridge Omega-first language interoperability: checked conversion backends and native language bindings Brought by drakestapleton Sign in to star 0 stars 0 watching About Files History Releases Proposed changes Issues For developers branch `main` Branches Tags History `omega-bridge / evidence / text-parent-verification / reproduce-text-view.py` 10 lines ยท 936 bytes Raw Blame History 1 from pathlib import Path 2 import subprocess as sp,json 3 h=Path.home();w=h/'workspace/omega-bridge-text-native';d=h/'handoffs/bridge-text-parent-verification';d.mkdir(exist_ok=True) 4 src=d/'library-text.om';src.write_text('fn pick a view uchar 3 to uchar\nret get a 2\nend\n') 5 r=sp.run([str(w/'tools/bridge'),'python',str(src)],capture_output=True);assert r.returncode==0,r.stderr 6 module=d/'library_text.py';module.write_bytes(r.stdout) 7 r=sp.run(['python3','-c',"import runpy,json,sys;m=runpy.run_path(sys.argv[1]);print(json.dumps({'text_type':type(b'abc').__name__,'text_result':m['omega_pick'](b'abc',3),'mutable_result':m['omega_pick'](bytearray(b'abc'),3)}))",str(module)],capture_output=True,text=True) 8 assert r.returncode==0,r.stderr 9 result=json.loads(r.stdout);assert result['text_result']==[8,None] and result['mutable_result']==[0,99],result 10 (d/'readonly-view-red.json').write_text(json.dumps(result,indent=2)+'\n');print(result)