-1

I have this python method shown below in a separate file and want to access and get value using plain js (no frame works used.) is there any way i can achieve this?

def myPythonCode :
        ....
        ...
        return somevalue
7
  • developer.mozilla.org/en-US/docs/Web/API/Fetch_API Commented Sep 26, 2019 at 9:30
  • How and where are you running your javascript code, how and where are you running your python code? Commented Sep 26, 2019 at 9:32
  • Read this stackoverflow.com/questions/13175510/… Commented Sep 26, 2019 at 9:33
  • Do you know about a client (JavaScript) - server (Python) side communication? It is best to do some research about how to do a client-server side communication through a web browser (or electron apps) with JavaScript first. Commented Sep 26, 2019 at 9:34
  • You can try Ajax. Commented Sep 26, 2019 at 9:36

1 Answer 1

0

You can use python wrapper for google V8 engine called PyV8

It act as a bridge between the Python and JavaScript objects, and support to hosting Google's v8 engine in a python script.

Sign up to request clarification or add additional context in comments.

1 Comment

i dont want to do any changes in python code. just plain js. i want to use scipy.spatial package, since js doesnt have anything. i used python for that and now i want to integrate python code with my plain js

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.