0

I am new to the python concepts. I have 3 health monitoring Applications Running in intel edison Device. I want to transmit these application result values(int value) to an android App.

So far am able to make a connection over Bluetooth(using SPP profile) with python script. Now I wanted to access those 3 global variables from the 3 different C codes(Application code in intel edison) and send it to Android App.

Someone help me or suggest any methods that are available..

1 Answer 1

1

If the attributes belong to the global scope of a module, then you can use "PyImport_AddModule" to get a handle to the module object. For example, if you wanted to get the value of an integer in the main module named "foobar", you would do the following:

PyObject *m = PyImport_AddModule("__main__");
PyObject *v = PyObject_GetAttrString(m,"foobar");

int foobar = PyInt_AsLong(v);

Py_DECREF(v);
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.