1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. Anuncie Aqui
    Anuncie aqui você Também: fdantas@4each.com.br

[Python] PyScript not displaying output

Discussão em 'Python' iniciado por Stack, Setembro 15, 2024.

  1. Stack

    Stack Membro Participativo

    I am running a very basic pyscript code that accesses a python file.

    The following is the HTML file:

    <!DOCTYPE html>
    <html lang="en">
    <head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>PyScript Debug</title>
    <!-- Using the latest stable version of PyScript -->
    <link rel="stylesheet" href="https://pyscript.net/releases/2024.9.1/core.css">
    <script type="module" src="https://pyscript.net/releases/2024.9.1/core.js"></script>
    </head>
    <body>
    <h1>PyScript Debugging Example</h1>

    <!-- Terminal display -->
    <py-terminal></py-terminal>

    <!-- Load the main.py file from the server -->
    <script src="https:/vivliosyn.com/python/main_1.py" config ="https:/vivliosyn.com/python/pyscript.json" ></script>

    </body>
    </html>


    '''

    The python file - main_1.py - has a single line

    '''

    print ("1")


    '''

    Both the HTML and the Python file, as well as the pyscript.json file are store in the same folder on a server (vivliosyn.com/Python).

    However, I am not getting the Python file output. I am able to get the output if I directly add the Python code directly to the HTML file.
    However, I am trying to build an application that has to access a larger python file that is saved as a .py file.

    Continue reading...

Compartilhe esta Página