I want to choose an embedded scripting language that i will use on C++. It should connect a database such as Oracle. My host application is a server application. That will pass
Save this as test.c:
#include
int
main(int argc, char *argv[])
{
Py_Initialize();
PyRun_SimpleString("from time import time,ctime\n"
"print 'Today is',ctime(time())\n");
Py_Finalize();
return 0;
}
Run this command (if you have Python 2.7 installed):
gcc test.c -o test -I/usr/include/python2.7 -lpython2.7
Python has now been embedded. This took me under a minute, so I'm having a hard time understanding the claims of the "effort needed to embed it".
The example is from http://docs.python.org/extending/embedding.html.
I would suggest Python over Lua, even though Lua is also nice.