Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

178
Visualizações
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 Respostas
Responde à pergunta

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 Relatório

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 Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda