0

As you know, technology was introduced as pyscript for the use of Python by html.

if you do not know: What is pyscript?

how do config that in xampp?

parto
  • 25
  • 2
  • 6
  • If you can serve HTML and javascript from your server, it should work. Not following your question since it runs in the browser of the client machine. There's example pages in [the repository](https://github.com/pyscript/pyscript) and you can try them on your server and see if they work like [the served version of those example here](https://pyscript.net/examples/). – Wayne May 10 '22 at 15:09
  • 1
    There is nothing you need to configure in XAMPP to serve Pyscript HTML files. Pyscript runs in the browser. Edit your question to better explain the problem you are trying to solve. – John Hanley May 10 '22 at 17:15
  • did you try to run any example on `xampp` ? `Pyscript` loads javascript module from external server and this module runs Python code. It also loads external modules from server pypi.org. Eventually it may only need to install python - but this doesn't need to configure `xampp` – furas May 11 '22 at 14:37

1 Answers1

1

Quote from pyscript.net

You don't need to install anything.

To use PyScript you can either download it and follow the instructions, or add the following lines to your page.

<link rel="stylesheet" href="https://pyscript.net/alpha/pyscript.css"/>
<script defer src="https://pyscript.net/alpha/pyscript.js"></script>

Click here for more info on how to use PyScript.

If you don't need MySQL you can serve your DocumentRoot even without XAMPP using python itself or any other lightweight webserver:

python3 -m http.server

Then start with a simple html file. PyScript will fetch and cache its needed dependencies automatically:

<html>
<meta charset="utf-8">
<link rel="stylesheet" href="https://pyscript.net/alpha/pyscript.css" />
<script defer src="https://pyscript.net/alpha/pyscript.js"></script>

<py-script>

print('Hello World! ')

</py-script>

</html>
cachius
  • 1,743
  • 1
  • 8
  • 21
  • 2
    [Self contained offline use is still being worked on.](https://github.com/pyscript/pyscript/issues/330) – cachius May 11 '22 at 14:56