brython "Uncaught ReferenceError: brython is not defined at onload"

376 Views Asked by At

hey guys and girls :) hope you can help me :) im trying to run brython but for some reason i just get "uncaught ReferenceError: brython is not defined at onload" . i did try it with local installation and i tried to use the CDN source files. and on both i get the same result. now basically i just copied from the documentation some simple sample just to get it work :)

i did brython-cli -update and im currently running a 3.10.3 version in local.

but even with the CDN import script it just didnt work

im rendering the html file through flask and running flask server(maybe its just that, have no idea).

<head>
  <meta charset="utf-8">
  <script type="text/javascript" src="brython.js"></script>
  <script type="text/javascript" src="brython_stdlib.js"></script>
</head>


<body onload="brython()">
  <h1>{{time_left}}</h1>

  <script type="text/python">
    from browser import document
    document <= "Hello !"
  </script>
</body>
0

There are 0 best solutions below