Does light charge the quons? › Files cited on the page › check_earnshaw_fable/

ctx.py

In the investigation at sim/charge_wave/check_earnshaw_fable/ctx.py · last changed in commit ca0b096, 12 November 2026 · 1,484 bytes · the folder as a zip


import re, html, sys
WS=re.compile(r"\s+"); TAG=re.compile(r"<[^>]+>")
def txt(p):
    raw=open(p,'rb').read().decode('utf-8','replace')
    raw=re.sub(r"(?is)<(script|style)[^>]*>.*?</\1>"," ",raw)
    return WS.sub(" ",html.unescape(TAG.sub(" ",raw)))
R="/home/doug/aetherscience/converted/"
def show(f, pat, before=900, after=600, maxn=3):
    t=txt(R+f); n=0
    for m in re.finditer(pat,t):
        print(f"\n### {f} [{pat}] @ {m.start()}\n"+t[max(0,m.start()-before):m.end()+after]); n+=1
        if n>=maxn: break
    if n==0: print(f"\n### {f} [{pat}]: no match")
show("www-energyscience-org-uk/le/le12.html", r"1983k", before=1500, after=300, maxn=2)
show("www-energyscience-org-uk/le/le12.html", r"APPENDIX", before=200, after=2500, maxn=1)
show("www-energyscience-org-uk/notes/rn9808.html", r"Impressions", before=300, after=300, maxn=2)
show("www-energyscience-org-uk/notes/rn9808.html", r"1998", before=200, after=200, maxn=3)
for f in ["www-energyscience-org-uk/le/le01app.html","www-energyscience-org-uk/notes/rn9713.html","www-energyscience-org-uk/question/es0105.html","www-energyscience-org-uk/tg/pr2.html"]:
    show(f, r"incompressib", before=700, after=500, maxn=1)
for f in ["2edpocch7.html","2edpocch8.html","www-energyscience-org-uk/le/le03app.html"]:
    show(f, r"uniform continuum", before=600, after=400, maxn=1)
show("2edpocch2.html", r"repel itself", before=300, after=900, maxn=1)
show("2edpocch1.html", r"idealization", before=100, after=1200, maxn=1)