[Python] Python webbrowser wrapper websocket?

Discussão em 'Python' iniciado por Stack, Julho 11, 2025.

  1. Stack

    Stack Membro Participativo

    I am developing a browser NFC solution for my raspberry pi. What I develop a Java applet in a Chrome browser. The Java applet is working with my NFC reader. Every time a tag my card he will call a JavaScript function and send my Card ID to this JavaScript function. There is an alert with my card ID.

    Java is really heavy and cost a lot of memory. What I do like is use Python instead of Java. The Python script needs to de the same as the Java applet.


    1. Read my NFC card


    2. Send the Card id to a JavaScript function


    3. Give an alert with my tag ID.


    4. Wait for the next card and do the same... Go to 1

    What I discover was a Python websocket It will put up a webserver easy. Put the problem I face is that the Python script cannot call directly a JavaScript function. The JavaScript function can call a Python function but not the way around.

    My question will be. Where can I find the solution to call every time the JavaScript function when I tag my NFC card with a Python script

    NFC Python is http://pyscard.sourceforge.net/

    [​IMG]

    Continue reading...

Compartilhe esta Página