Update the Brython tutorial

This commit is contained in:
Michael Mintz 2022-01-05 12:16:27 -05:00
parent 186bd1a03a
commit 406c458ff4
3 changed files with 7 additions and 4 deletions

View File

@ -3,9 +3,11 @@
* Brython was designed for replacing JavaScript with Python. * Brython was designed for replacing JavaScript with Python.
* This tutorial will show you how to get started quickly. * This tutorial will show you how to get started quickly.
### 0. Install ``brython``: ### Here's the web app you'll be creating:
<i>(Note: SeleniumBase no longer includes ``brython`` as part of installed dependencies.)</i> <img src="https://seleniumbase.io/cdn/img/brython_demo.png" alt="Brython Demo" title="Brython Demo" width="410" />
### 0. Install ``brython``:
```bash ```bash
pip install brython pip install brython
@ -18,6 +20,7 @@ pip install brython
```bash ```bash
python -m http.server python -m http.server
``` ```
You can always stop the server by using ``CTRL+C``. You can always stop the server by using ``CTRL+C``.
### 2. Navigate to [http://localhost:8000/](http://localhost:8000/) ### 2. Navigate to [http://localhost:8000/](http://localhost:8000/)

View File

@ -21,7 +21,7 @@
padding: 8px; padding: 8px;
} }
</style> </style>
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/brython/3.9.2/brython.js"></script> <script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/brython/3.10.4/brython.js"></script>
</head> </head>
<body onload="brython()"> <body onload="brython()">
<table> <table>

View File

@ -21,7 +21,7 @@
padding: 4px; padding: 4px;
} }
</style> </style>
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/brython/3.9.2/brython.js"></script> <script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/brython/3.10.4/brython.js"></script>
</head> </head>
<body onload="brython(1)"> <body onload="brython(1)">
<script id="ascript" type="text/python"> <script id="ascript" type="text/python">