|
|
|
|
|
by meredydd
3158 days ago
|
|
I think it's mostly a difference in approach. Brython sets out to "replace Javascript with Python" as the language of scripting the Web. This means it has custom bindings to the browser API, supports writing Brython in <script> tags, uses slightly funky/un-Pythonic operators to do DOM manipulation, etc. Brython code can't block, to my knowledge (although the Python 3 async stuff makes that constraint much less painful these days). Skulpt is "a Python implementation in JS". It doesn't have built-in DOM bindings - it's typically used within a project like Anvil or Trinket which provides higher-level (and therefore more Pythonic) modules for display/input/IO. Skulpt code can block, which also helps keep those APIs simple. I guess my summary would be that Brython is great for scripting your HTML in Python rather than Javascript, but Skulpt is best for providing a Python runtime in your app. Does that make sense?
(Of course, you'd have to ask a Brython developer for their take on it ;) ) |
|