Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

179
Vistas
How to use python program for a web extension?

I am making a simple web extension. I want to attach a python program to its files so that the python program can use the data entered by the user in the extension popup for a particular operation and the output will be displayed on the extension popup.

Please guide me in this process. It's my first time making a web extension.

about 4 years ago · Juan Pablo Isaza
2 Respuestas
Responde la pregunta

0

I don't think you can execute python script inside javascript file. these are two option you can use:-

  1. create api with python script and call api inside you javascript file.
  2. explore pyscript , Pyscript is used for using python script inside html code.(I have not tried it yet)
about 4 years ago · Juan Pablo Isaza Denunciar

0

You can use PyScript to write your entire extension with Python.

Take a look at this simple example of running python and DOM manipulating:

<html>
    <head>
        <link rel="stylesheet" href="https://pyscript.net/alpha/pyscript.css" />
        <script defer src="https://pyscript.net/alpha/pyscript.js"></script>
         <style>
            h1 {
                font-size: 20px; 
                color: green; 
                text-transform: uppercase;
                text-align: center; 
                margin: 0 0 35px 0; 
                text-shadow: 0px 1px 0px #f2f2f2;
            }
        </style>
    </head>
    <body>
    <h1>PyScript Events</h1>
    <div>
        <p> I am just a random element </p>
        <p id="change_me"> I think PyScript is awesome </p>
        <p> I like hamburgers  </p>
    </div>
    
    <py-script>
import pyodide

def on_click(e):
    e.target.innerHTML = "PyScript is really awesome!"
    
change_me_element = document.getElementById('change_me')
change_me_element.addEventListener('click', pyodide.create_proxy(on_click))
    </py-script>
    
    </body>

Here you have a great tutorial about getting started with PyScript.

about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda