Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

177
Views
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 answers
Answer question

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 Report

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 Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!