PythonÀ©Õ¹ºÍǶÈë
1.PythonµÄÀ©Õ¹
PythonÀ©Õ¹ÊÇÖ¸ÔËÓÃÆäËûÓïÑÔ±àдijЩ¹¦ÄÜÄ£¿é£¬¹©Python³ÌÐòµ÷Ó㬳£ÓõÄÓÐPythonµÄCÀ©Õ¹ºÍC++À©Õ¹¡£PythonÀ©Õ¹µÄÄ¿µÄÖ÷ÒªÓÐÁ½¸ö£ºÒ»ÊÇΪÁ˹¦ÄÜÐèÒª£¬ÁíÍâÒ»¸öÔÒòÊÇΪÁËÐÔÄÜÐèÒª¡£ÏÂÃæ½éÉÜÒ»ÏÂÔÚ²»ÔËÓù¤¾ßµÄÇé¿öÏ£¬ÔËÓÃCºÍC++ÓïÑÔ¶ÔPython½øÐÐÀ©Õ¹µÄ²½Öè¡£
À©Õ¹µÄµÚÒ»²½ÊÇÓÃC»òC++´´½¨Ò»¸öÔ´³ÌÐò£¬È»ºóΪԴ³ÌÐòÌṩһ¸ö°ü¹üÒÔ¹©Pythonµ÷Ó㬵ÚÈý²½ÊDZàÒëÁ´½ÓÉú³ÉÏàÓ¦µÄdllÎļþ¡£ÎªÔ´³ÌÐòÌṩ°ü¹üÊÇÕâÀïÃæ×îÖØÒªÒ²ÊÇ×î·±ËöµÄÒ»²½£¬ËüÓÖϸ·ÖΪÈý¸ö²¿·Ö£¬µ¼³öº¯Êý£¬·½·¨ÁбíºÍ³õʼ»¯º¯Êý¡£¶ÔÓÚÀ©Õ¹µÄÿһ¸öº¯Êý£¬¶¼»áÓÐÒ»¸öµ¼³öº¯ÊýÓëÖ®Ïà¶ÔÓ¦£¬ÔÚPythonµÄCÓïÑÔÀ©Õ¹ÖУ¬ËùÓеĵ¼³öº¯Êý¶¼¾ßÓÐÏàͬµÄº¯ÊýÔÐÍ£º
PyObject* method(PyObject* self, PyObject* args);
·½·¨Áбí¸ø³öÁËËùÓÐÄܹ»±»PythonʹÓõķ½·¨£¬ËüÓÉËIJ¿·Ö×é³É£º·½·¨Ãû£¬µ¼³öº¯Êý£¬²ÎÊý´«µÝ·½Ê½ÒÔ¼°·½·¨ÃèÊö¡£·½·¨ÃûÊÇ´ÓPython½âÊÍÆ÷Öе÷Óø÷½·¨Ê±ËùʹÓõÄÃû×Ö¡£²ÎÊý´«µÝ·½Ê½Ôò¹æ¶¨ÁËPythonÏòCº¯Êý´«µÝ²ÎÊýµÄ¾ßÌåÐÎʽ£¬¿ÉÑ¡µÄÁ½ÖÖ·½Ê½ÊÇMETH_VARARGSºÍMETH_KEYWORDS£¬ÆäÖÐMETH_VARARGSÊDzÎÊý´«µÝµÄ±ê×¼ÐÎʽ£¬Ëüͨ¹ýPythonµÄÔª×éÔÚPython½âÊÍÆ÷ºÍCº¯ÊýÖ®¼ä´«µÝ²ÎÊý£¬Èô²ÉÓÃMETH_KEYWORD·½Ê½£¬ÔòPython½âÊÍÆ÷ºÍCº¯ÊýÖ®¼ä½«Í¨¹ýPythonµÄ×ÖµäÀàÐÍÔÚÁ½ÕßÖ®¼ä½øÐвÎÊý´«µÝ¡£
ËùÓеÄÄ£¿é¶¼»áÓÐÒ»¸ö³õʼ»¯º¯Êý£¬ÒÔ±ãPython½âÊÍÆ÷Äܹ»ÕýÈ·µØ³õʼ»¯¸ÃÄ£¿é¡£Python½âÊÍÆ÷¹æ¶¨ËùÓеijõʼ»¯º¯ÊýµÄº¯ÊýÃû¶¼±ØÐëÒÔinit¿ªÍ·£¬²¢¼ÓÉÏÄ£¿éµÄÃû×Ö¡£
2. PythonǶÈë
PythonÖкóÆÚ»á¼ÓÈëһЩÀý×Ó˵Ã÷£¬Î´Íê´ýÐø¡£¡£¡£
Ïà¹ØÎĵµ£º
(ת)[Python ѧϰ]2.5°æyield֮ѧϰÐĵÃ
ÔÚ shhgs ·¢²¼Á˹ØÓÚ¡¶ Py 2.5 what's new Ö® yield¡·Ö®ºó£¬ÔÀ´ÎÒ²»ÊÇÌرð¹Ø×¢ yield µÄÓ÷¨£¬ÒòΪ¶ÔÓÚ2.3ÖмÓÈëµÄyieldÏà¶ÔÀ´Ëµ¹¦Äܼòµ¥£¬ËüÊÇ×÷Ϊһ¸ö generator ²»¿ÉȱÉÙµÄÒ»ÌõÓï¾ä£¬Ö»Òª°üº¬ËüµÄº¯Êý¼´ÊÇÒ»¸ö generator ¡£µ«ÔÚ2.3ÖУ¬generator ²»ÄÜÖØÈ룬²»ÄÜÔÚÔËÐй ......
ÔÚPythonÖУ¬ÎÒÃÇÖ´Ðбí´ïʽ a = 3£¬Python»áÔõÑù²Ù×÷ÄØ£¿
1¡¢Ê×ÏȻᴴ½¨Ò»¸ö¶ÔÏó±íʾֵ3
2¡¢Èç¹û±äÁ¿a²»´æÔÚ£¬´´½¨±äÁ¿a
3¡¢°Ñ±äÁ¿aÁ¬½Óµ½±íʾ3µÄ¶ÔÏó
ÔÚPythonÖУ¬±äÁ¿ºÍ¶ÔÏó´æ´¢ÔÚ²»Í¬µÄµØ·½£¬Í¨¹ýÖ¸ÕëÁ¬½ÓÆðÀ´...
Ò»¸ö±äÁ¿×ÜÊǺͶÔÏóÁ¬½ÓÆðÀ´£¬²»´æÔÚ²»ºÍ¶ÔÏóÁ¬½ÓµÄ±äÁ¿£¬µ«ÊÇ´óµÄ¶ÔÏó¿ÉÄÜÁ¬½Óµ½±ðµÄ¶ÔÏó¡£ ......
Python»ù±¾°²×°£º
* http://www.python.org/ ¹Ù·½±ê×¼Python¿ª·¢°üºÍÖ§³Ö»·¾³£¬Í¬Ê±Ò²ÊÇPythonµÄ¹Ù·½ÍøÕ¾£»
* http://www.activestate.com/ ¼¯³É¶à¸öÓÐÓòå¼þµÄÇ¿´ó·Ç¹Ù·½°æ±¾£¬ÌرðÊÇÕë¶ÔWindows»·¾³Óв»ÉٸĽø£»
PythonÎĵµ£º
* http://www.pyth ......
PyRSS2Gen £ºrssÉú³É
ÏÂÔصØÖ·£ºhttp://www.dalkescientific.com/Python/PyRSS2Gen-1.0.0.tar.gz
Àý×Ó£º
Java´úÂë
import datetime
import PyRSS2Gen
rss = PyRSS2Gen.RSS2(
title = " ......
ipython Èç¹ûûÓÐÓÃ×°, ÄǾ͸Ͻô×°ÉÏ, Õâ¸ö¶«Î÷±ÈÆðpython×Ô¼º´øµÄÄǸö½»»¥½çÃæÒªºÃÓúܶà
shutil ÀàËÆÓÚshellµÄһЩ½Ó¿Ú, ±ÈÈç cp, mvµÈµÈ
subprocess µ÷ÓÃ×Ó½ø³Ì
optparse ½âÎöÃüÁîÐвÎÊýµÄ, ÓÃËüÀ´Ó¦¸¶ÃüÁîÐвÎÊý, ¼ò½à, ÇåÎú
sqlite3 Êý¾Ý¿â, ½ø³Ì¼¶µÄÊý¾Ý¿â, ºÜ¿á, ÉõÖÁ¿ÉÒÔ°ÑÕâ¸öÊý¾Ý¿â½¨ÔÚÄÚ´æÀï. http://www.py ......