每日 Harness 开源 · Source
返回本期 · Back to 2026-09-06

开源 / 项目 · Projects2026-09-06 · Sunday, September 6, 2026

Myjs: An accidental pure-Python JavaScript interpreter

pypi.org原文 ↗

Myjs: An accidental pure-Python JavaScript interpreter
myjs 0.0.3 将 Python 版 Acorn 解析器、树遍历 evaluator、代码生成器和 domonic DOM 组合成解释运行时,可把 JavaScript 在 Python 进程内执行并做 source/AST/source 往返。Session 提供隔离 scope、捕获 `console.log` 与带 `js_line`/`js_trace` 的异常;测试覆盖 closures、classes、generators、async/await 和常见内建对象,但明确没有 Proxy/with。PyPI 将其标为 Alpha,Python 3.10+、MIT,适合嵌入和实验,不宜误当完整浏览器引擎。
–浏览

评论 · Comments