0

I have a local HTML page: leaflet.html, which is displayed in an embedded browser inside a python-tkinter application.

Inside leaflet.html there is a simple JavaScript piece of code that contains a function:

addMarkerIn(longitude, latitude)
{
}

It is not important what this function does, what I need is to call addMarkerIn from python when a specific event occurs. Is it possible to avoid building a full http server environment and communicate through other methods such as named pipes?

Alex Foglia
  • 520
  • 5
  • 16

2 Answers2

1

You can add socket connection between js on html page and python backend. Using some library (like socket.io) it seems to be the simplest way.

A Ralkov
  • 1,046
  • 10
  • 19
0

Maybe this answer I wrote once helps you out?

You could make a function in python called addMarkerIn and call it with subprocess

JaFizz
  • 328
  • 2
  • 20