python-eel/Eel

Callback function question

Open

#378 geöffnet am 12. Aug. 2020

Auf GitHub ansehen
 (0 Kommentare) (0 Reaktionen) (0 zugewiesene Personen)Python (570 Forks)batch import
help wanted

Repository-Metriken

Stars
 (5.980 Stars)
PR-Merge-Metriken
 (Keine gemergten PRs in 30 T)

Beschreibung

Describe the problem According to your example, to get a return value i need to use callback functions but how do i get to use that return value in my callback function? Code snippet(s) my python script

@eel.expose
def get_calcIntVal(tick , col):
   print("Getting INTVAL for ")
   iv = ivs.intrisicVal()
    df = iv.calcIntVal(tick)
    print("Done")
    return iv.find(df,0,col)

my javascript script

eel.expose(printIV)
            function printIV(data,app){
                console.log("app is " + app)
                console.log(document.getElementById(app))
                document.getElementById(app).innerHTML = data;
            }
eel.get_calcIntVal("MSFT" , "intrisic_per_share" )(printIV("fv"))

Data should be the value retrieve from get_calcIntVal but i dont know how to pass it

Desktop (please complete the following information):

  • Windows 10
  • Chrome

Ummm i dont know how to insert multiple lines of code here.

Contributor Guide