Userinterface/PythonApplicationModule.cpp
// Add
#include <Shellapi.h>
// Search
PyObject* appExit(PyObject* poSelf, PyObject* poArgs)
{
CPythonApplication::Instance().Exit();
return Py_BuildNone();
}
// Add
PyObject * appOpenWebBrowser(PyObject * poSelf, PyObject * poArgs)
{
char * szURL;
if (!PyTuple_GetString(poArgs, 0, &szURL))
return Py_BuildException();
char * getChormeURL;
_snprintf(getChormeURL, sizeof(getChormeURL), "%s --non-incognito", szURL);
ShellExecuteA(0, 0, "chrome.exe", getChormeURL, 0, SW_SHOWMAXIMIZED);
return Py_BuildNone();
}
// Search
{ "Exit", appExit, METH_VARARGS },
// Add
{ "OpenURL", appOpenWebBrowser, METH_VARARGS },
For Ex:
app.OpenURL('www.norsmt2.com')