Closed enzok closed 4 years ago
Hi @enzok. Sorry you're having trouble.
The code snippets you've provided aren't functional - eel isn't initialised or started, and the JS decoder function isn't exposed to Eel. Could you please provide working code snippets and then perhaps we can help you more effectively? :)
i've updated the snippets. is it possible to use the return values from JS in my python script?
Yes - see the example here: https://github.com/samuelhwilliams/Eel/blob/master/examples/03%20-%20sync_callbacks/sync_callbacks.py
Essentially you need to change res = eel.decoder(n)
to res = eel.decoder(n)()
.
Does that work for you?
Thank you I can't believe I missed that. After making the changes to resemble that example, it appears to be working now. Awesome.
I'd like to use JS functions in my Python script to decode obfuscated text. I can send the input parameters to JS, but have not been able to use the results as return variables in Python.
I tried with a callback, but was only able to print the value. Not sure what I'm missing here.
Thanks.
Code snippet(s)