Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

¼ò»¯Python½âÊÍ»·¾³µÄ°²×°

ÎÊÌâÃèÊö
ÔÚC++ºÍPython»ìºÏ±à³ÌÖУ¬ÔÚÈí¼þ·¢²¼µÄʱºòÐèÒª½«pythonµÄ½âÊÍÆ÷´ò°üµ½°²×°³ÌÐòÖУ¬ÎªÁËÌá¸ßÓû§ÌåÑ飬ÎÒÃÇÐèÒªÈÃÓû§¸Ð¾õ²»µ½pythonµÄ°²×°£¬Èç¹ûÓû§ÒѾ­°²×°ÓÐpythonµÄ»·¾³£¬ÎÒÃÇÒ²Òª±£Ö¤²»Ó°ÏìÏÖÓеÄϵͳ¡£
½â¾ö·½°¸
ÔÚPython2.5ÒÔºó£¬pythonÖ§³Ö´ÓzipÎļþÖжÁÈ¡python½Å±¾Îļþ£¬Ö§³Ö¶ÁÈ¡py£¬pyc£¬pyo£¬²»Ö§³Ö¶ÁÈ¡pyd£¬Òò´Ë
ÎÒÃÇ¿ÉÒÔ½«pythonµÄ±ê×¼¿â±àÒëÒÔºó´ò°üµ½Ò»¸özipÎļþÖУ¬ÔÚC++Öе÷ÓÃpython½Å±¾µÄʱºò£¬½«zipÎļþ¼ÓÈëµ½sys.pathµÄËÑË÷·¾¶ÖÐÀ´Íê³É¡£
½«pythonµÄ±ê×¼¿âµÄ½Å±¾ÎļþĿ¼C:\Python25\LibÖеĽű¾Îļþcopyµ½Ò»¸öÖ¸¶¨µÄĿ¼£¬È»ºóÎÒÃÇɾ³ýµôһЩ²»ÓõĿâÎļþ±ÈÈçmsilib£¬complierµÈ£¨´Ë²½²»ÊìϤ¿ÉÒÔ²»ÒªÊ¡È¥É¾³ý¶àÓàÎļþ£©¡£
½«½Å±¾±àÒëΪÓÅ»¯ºóµÄÎļþ python -O -m compileall destdir£¬È»ºóɾ³ýËùÓÐÈßÓàµÄpyºÍpyc£¬ del /S /Q "%1\*.pyc" "%1\*.py " ( %1 ±íʾĿ±êÎļþ¼Ð )
½«ÎļþѹËõ³Ézip¸ñʽ "%WINRAR_DIR%\WinRar" a -r -m5 -tk "python25.zip"  "*"
ÎÒÃÇ×Ô¼ºµÄpyÎļþ¿ÉÒÔ°´ÕÕͬÑùµÄ·½·¨Ñ¹Ëõµ½src.zipÖÐ
½«pythonµÄpydÎļþ(WindowsĬÈÏÊÇC:\Python25\DLLs)¸´ÖƵ½Ä¿±êÎļþ¼Ðpython25_dllÖÐ
½«python25.dll¸´ÖƵ½Ó¦ÓóÌÐòµÄËÑË÷·¾¶ÖÐ
ÔÚC++Öе÷ÓÃPythonµÄC APIÉèÖÃpython¿âµÄËÑË÷·¾¶£¬ÕâÑùÎÒÃǾͿÉÒԾͿÉÒÔͨ¹ýPython C API½øÐлìºÏÓïÑԵıà³Ì£¬ÔÚ²¿ÊðµÄʱºò²»ÐèÒªµ¥¶À°´ÕÕpython°²×°³ÌÐò
    char buffer[1024] = { 0 };
    Py_Initialize();
    PyRun_SimpleString( "import sys" );
    //»ñÈ¡µ±Ç°Â·¾¶,Èç¹ûÊÇGUI³ÌÐòÓпÉÄÜ»á¸Ä±ä³ÌÐòµÄµ±Ç°¹¤×÷Ŀ¼£¬Èç¹ûÊÇ·þÎñÆ÷
    //³ÌÐòÒ»°ãµ±Ç°µÄ¹¤×÷Ŀ¼¾ÍÊǶþ½øÖÆÎļþËùÔÚµÄĿ¼
#ifdef WIN32
    char achCwdBuf[PATH_MAX] = {0};
    if( NULL != GetModuleFileName(NULL, achCwdBuf, PATH_MAX) )
#else
    if( NULL != ACE_OS::getcwd(achCwdBuf, PATH_MAX) )
#endif // end of ifdef WIN32
    {       
        string strCwd = achCwdBuf;
        strCwd = strCwd.substr( 0, strCwd.find_last_of(


Ïà¹ØÎĵµ£º

ʹÓÃPython´¦ÀíExcel±í¸ñ

http://cocobear.info/blog/2009/01/16/use-python-deal-with-excel/
ʹÓÃPython´¦ÀíExcel±í¸ñ 2009Äê01ÔÂ16ÈÕ
¸ø°³µÄbossдµÄÒ»¸öС¹¤¾ß£¬Ê¹ÓÃPython¶ÔExcel½øÐÐͳ¼Æ£¬È»ºó°Ñ½áÊøÉú³ÉÒ»¸öеÄExcel±í¸ñ£¬Ê¹Óõ½ÁËxlrdºÍpyExceleratorÁ½¸ö¿â¡£
¼òµ¥µÄ½éÉÜÒ»ÏÂÕâÁ½¸ö¿â£¬ÏÈ˵xlrd£¬Õâ¸ö¿â¶ÁExcel±È½Ï·½±ã£¬¸÷ÖÖ·½·¨Ê¹ÓÃÆ ......

PythonÓëMicrosoft Office×Ô¶¯»¯²Ù×÷

http://www.cnblogs.com/Jedimaster/archive/2007/02/28/660209.html
¡¡¡¡ÅóÓѵļÒÈË×öÉúÒ⣬ÿÈÕ´Ó¸÷µØ·Öµê´¦ÊÕ¼¯±¨±í£¬È»ºó»ØÈ¥»ã×Ü¡£ÓÉÓÚ²»ÏëÓÃÄÇÖÖ¸´ÔӵĹÜÀíÈí¼þ£¬¾Í½ÐËûдһ¸öС¹¤¾ß¡£ÓÚÊÇËûÕÒµ½ÁËÎÒ£¬ÈÃÎÒÏëÏë°ì·¨¡£
¡¡¡¡PythonÊǸöÁîÈ˾ªÆæµÄ¹¤¾ß£¬¶ø²»½ö½öÊÇÒ»ÖÖÓïÑÔ¡£¶Ô±ÈÀÏÅƵÄPerl£¬¿´ËÆPython²»ÊÇÄÇôµÄ¾«Í¨ ......

PythonÄ£¿éѧϰ urllib


    urllibÄ£¿éÌṩµÄÉϲã½Ó¿Ú£¬Ê¹ÎÒÃÇ¿ÉÒÔÏñ¶ÁÈ¡±¾µØÎļþÒ»Ñù¶ÁÈ¡wwwºÍftpÉϵÄÊý¾Ý¡£Ã¿µ±Ê¹ÓÃÕâ¸öÄ£¿éµÄʱºò£¬ÀÏÊÇ»áÏëÆð¹«Ë¾²úÆ·µÄ¿Í»§¶Ë£¬Í¬ÊÂÓÃC++ÏÂÔØWebÉϵÄͼƬ£¬ÄÇÖÖ“Í´¿à”µÄ±íÇé¡£ÎÒÒÔÇ°·­Òë¹ýlibcurl½Ì³Ì£¬ÕâÊÇÔÚC/C++»·¾³Ï±ȽϷ½±ãʵÓõÄÍøÂç²Ù×÷¿â£¬Ïà±ÈÆðlibcurl£¬PythonµÄurl ......

Python³£ÓÃÄ£¿éÏÂÔØÁ´½Ó

Python http://www.python.org/download/ wxPython http://www.wxpython.org/download.php#binaries Vpython http://vpython.org/contents/download_windows.html Matplotlib http://sourceforge.net/projects/matplotlib/files/matplotlib/ PyGlet http://www.pyglet.org/download.html PyGame http://www.pyga ......

RubyºÍPythonµÄÓï·¨±È½Ï


RubyºÍPythonµÄÓï·¨±È½Ï
 
 
 
ÆäʵRubyºÍPython·Ç³£½Ó½ü£¬±È´ó¶àÊý±ðµÄÓïÑÔÒª½Ó½üµÄ¶à£¬ËùÒÔϲ»¶ÓÃɶ¾ÍÓÃɶ£¨´óʵ»°£¬ËäȻҲÊÇ·Ï»°£©¡£Óï·¨ÉϵIJî±ðËäÈ»ÓÐÄÇôһµã£¬´ó²¿·ÖÊÇsyntax sugar£¬ÎÒ¶·µ¨ÉÔ΢Áм¸¸ö£¨pythonÎÒÒ²ÍüµÃ²î²»¶àÁË£¬²»¶ÔµÄ´ó¼Ò¾¡¹ÜÀ´±Þʬ°É£©£¬µ«ÊÇÖ÷Òª²îÒ컹ÊÇÉè¼Æ˼ÏëÉϵģºÁé»î ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ