C++Öе÷ÓÃpythonº¯Êý£¬·¢ÏÖpythonº¯ÊýµÄÒì³£ÔÚC++ÖÐÎÞ·¨²¶»ñ¡£
µ÷Óú¯ÊýÈçÏ£¬Çë´óÏÀ½â»ó
unsigned long CPythonHelper::Execute(const std::string& mml_cmd,
unsigned char flag,
bool is_quick_cfg,
cm_mit_chk_rst& mit_chk_rst,
bool need_check_license,
unsigned int scene,
std::string user_name,
unsigned int user_type)
{
mutex::scoped_lock lock(_py_helper_mutex, true);
try
{
CPyObjList pyObjLst, pyDisRules;
CPyObjArray PyArr(7);
CPyObject pyRetObj, pyCmdPara;
PyArr.SetItem(0, mml_cmd);
PyArr.SetItem(1, flag);
PyArr.SetItem(2, (int)is_quick_cfg);
PyArr.SetItem(3, user_name);
PyArr.SetItem(4, (int)user_type);
PyArr.SetItem(5, (int)need_check_license);
PyArr.SetItem(6, (int)scene);
m_pyParser.ExecFunction("Execute", PyArr, pyObjLst); --pythonÅ׳öµÄÒì³££¬C++²¶»ñ²»µ½£¬²»ÖªµôΪºÎ
if (!get_mit_chk_rst(pyObjLst, mit_chk_rst))
&nb
ÓÐÒ»10*10¾ØÕ󣬳ýÈ¥µÚÒ»¸öµã£¨0£¬0£©ºÍ×îºóÒ»µã£¨9£¬9£©£¬»¹Óа˸öµãΪ1£¬ÆäËû¶¼Îª0£¬ÒªÇóÓöþάÊý×é±íʾ¡£°Ë¸öµãÊÇËæ»úÉú³ÉµÄ£¬±àдÏà¹Ø³ÌÐò±íʾ¾ØÕóËùÓпÉÄÜÇé¿ö¡£
ÕæÐÄÇó½Ì¸÷λ¸ßÊÖ£¬°¥£¡±¾ÈËÌ«²ËÁË£¡ºÇºÇ£¡
......
pythonµÄPIL¿â×Ô´øµÄ·½·¨Ö»ÄܽøÐоØÐεÄÇиÈç¹ûÎÒÓÐÁËÒ»¸ö¶à±ßÐθ÷¸ö¶¥µãµÄ×ø±ê£¬ÈçºÎ¶ÔÏÖÓеÄͼƬ°´ÕÕÕâ¸ö¶à±ßÐνøÐÐÇиîÄØ£¿
²»Ò»¶¨ÒªÓÃPIL¿â£¬ÈκÎÄÜʵÏÖÕâ¸ö¹¦Äܵķ½·¨¶¼ÐС£
ͼƬÇиîµÄjs²»ÊǺܶàÂð£¿
......