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

363
Views
cómo llamar a una función python desde la función javascript en brython

Quiero llamar a una función de python desde javascript en brython pero no funciona. Quién puede ayudarme ?

 <!-- HTML CODE --> <input type="text" id="height2" /> <br /> <br /> <input type="text" id="width2" /> <br /> <br /> <input type="text" id="color2" /> <br /> <br /> <button onclick="draw_js_2()">Draw</button> <div id="shap2"></div>
 // javascript CODE function draw_js_2() { var height2 = parseInt(document.getElementById('height2').value); var width2 = parseInt(document.getElementById('width2').value); var color2 = document.getElementById('color2').value; // call the python function draw_br_2(height2, width2, color2); }
 # PYTHON CODE shap2 = document['shap2'] def draw_br_2(height2, width2, color2): shap2.attrs['style'] = f"background-color: {color2}" shap2.height = height2 shap2.width = width2 window.draw_br_2 = draw_br_2

Quiero obtener los datos de la plantilla mediante javascript y pasarlos a una función de python para dibujar un cuadrado. ¡pero no funciona! no se porque por favor, ayúdame ! Gracias

about 4 years ago · Juan Pablo Isaza
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!