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

258
Visualizações
Python eel module doesn`t recognize JS functions

when Im calling the JS function through my python code with the eel.function()() it says "Cannot find reference 'function' in 'init.py'", it seems to be working fine in my teachers video. Here`s the python code:


eel.init('web')


def user_input():
    eel.get_ready()()

    while True:
        loading = int(input("[+] start loading? 1/0"))
        if loading == 1:
            eel.js_start_loading()()

        elif loading == 0:
            eel.js_stop_loading()()


eel.spawn(user_input())
eel.start('index.html', size=(850, 360), port=0)

Here`s the JS code:

    var progress = null;
    eel.expose(js_start_loading);
    function js_start_loading() {
        progress = Metro.activity.open({
            type: 'square',
            overlayColor: '#fff',
            overlayAlpha: 1,
            text: '<div class=\'mt-2 text-small\'>Please, wait...</div>
        });
    }

    eel.expose(js_stop_loading);
    function js_stop_loading() {
        Metro.activity.close(progress);
    }

   eel.expose(get_ready);
   function get_ready() {
       $(document).ready(function(){
           return true;
       });
   }

Would appreciate any help

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