Is Brython entirely client-side?

后端 未结 4 469
温柔的废话
温柔的废话 2021-02-04 04:17

I have a piece of code written in Python. I would like to put that code in a webpage. Brython seems like the simplest way to glue the two things together, but I don\'t have a se

4条回答
  •  夕颜
    夕颜 (楼主)
    2021-02-04 04:56

    Brython doesn't always work with python code, I've learned.

    Something I think needs to be clarified is that while you can run brython in a very limited capacity by accessing the files locally, (because of the AJAX requirement) you can't import libraries - not even the most basic (e.g., html, time). You really need a basic web server in order to run brython.

    I've found it's good for basic scripts, since my python is better than my JS. It seems to break with more complicated syntax, though.

提交回复
热议问题