³õѧPython£¬ÓÃEclipse+pydev£¬µ÷ÊÔʱÔõô´«Èë²ÎÊý
ÈçÌ⣬ÎÒµÄÖ÷º¯ÊýÊÇ´«Èë²ÎÊýµÄ£¬Æ½Ê±ÔËÐÐʱÊÇÓÃÃüÁîÐд«Èë²ÎÊýÔËÐУ¬ÏÖÔÚÏëµ÷ÊÔ£¬²»ÖªµÀÔõô´«½øÕâ¸öÃüÁîÐеIJÎÊý
¿´ Run ²Ëµ¥ÖÐµÄ Open run Dialog... ÀïÃæÓУ¬Ï¸ÐÄ¿´Ò»ÏÂ
ûÓÐÕâÒ»Ïî°¡
sys.argv.append("...")
È»ºóÖ±½ÓÔËÐÐ...
run -> run configuration ->
×ó²àÑ¡Ôñpython run Ë«»÷, ÓÒ²à»áн¨Ò»¸örunµÄÅäÖÃ, ×îÉÏÃæµÄnameÊÇÄãÕâ¸örunÅäÖõÄÃû×Ö, ËæÒâд.
ÏÂÃæÖ÷ÒªµÄÑ¡ÏÓÐ:
Main: ÅäÖÃÖ÷³ÌÐòÏà¹Ø
project: Ñ¡ÔñÄãµÄÏîÄ¿
main model: Ñ¡ÔñÄãµÄÈë¿ÚÄ£¿é
Arguments: ÅäÖÃÆô¶¯²ÎÊý
program arguments: ÕâÀïÌîдÄãµÄ³ÌÐò²ÎÊý
vm arguments: Ìîдpython½âÊÍÆ÷²ÎÊý
Interpreter: ÅäÖÃpython½âÊÍÆ÷
Â¥ÉϺܺÃ
Ïà¹ØÎÊ´ð£º
×î½üÓÃpythonдһ¸ö³ÌÐò,×ÜÊÇÒì³£Í˳ö£¬µ«ÊÇȴû·¨ÓÃtry..exceptÀ´²¶×½
ÓÉÓÚû·¨·¢Í¼Æ¬£¬ËùÒÔ°ÑÏà¹ØµÄÐÅÏ¢´òÓ¡³öÀ´
Òì³£µÄÐÅÏ¢´óÖÂÈçÏ£º
python.exeÓöµ½ÎÊÌâÐèÒª¹Ø±Õ¡£ÎÒÃǶԴËÒýÆðµÄ²»±ã±íʾ±§Ç¸ ......
ѧϰÓÃpython+tkдÁËÒ»¸ö¼òµ¥½Å±¾£¬ÓÃÀ´ÏÔʾһЩͼƬºÍÆä˵Ã÷£¬Éè¼Æ2¸ö°´Å¥À´·Ò³¡£¿Ø¼þ²ÉÓÃpack()·½Ê½£¬Ö÷´°¿ÚûÓÐÌرðÖ¸¶¨³ß´ç£¬°´Ï·ҳ°´Å¥ºóÄÜ×Ô¶¯ÒÀ¾ÝÄÚÈÝ×Ô¶¯Ëõ·Å´óС£¬ÈçÔ¤ÆÚÉèÏë¡£²»¹ý±È½ÏÆæ¹ÖµÄÊÇ,Èç¹ûÓÃÊ ......
ÇëÎÊÏ£¬ÎÒµÄÊÇpython2.5°²×°ÁËPILÄ£¿é£¬È»ºó±àд³ÌÐò´ò¿ª±¾»úÉϵÄÒ»¸öͼƬʱ£¬ÎªÊ²Ã´ÀϳöÏÖ´íÎóÄØ£¬ÀÏÊÇÕÒ²»µ½Í¼Æ¬£¬´íÎóÌáʾÈçÏ£ºFile "C:\Python25\Lib\site-packages\PIL\Image.py", line 1888, in o ......
ÒÑ×öjava¿ª·¢2Ä꣬Ïë½Ó´¥ÏÂpython£¬À´ºÍpython°æ¿éµÄÅ£ÈËÃÇѧϰѧϰ
1.pythonÊDz»ÊǷֺܶ෽Ïò£¬¸Õ²Å²éÁËÒ»ÏÂÓÐjpythonºÍcpythonµÈµÈ£¬jpythonÖ÷ÒªÕë¶Ôjava£¬ÎÒÊDz»ÊÇÓ¦¸ÃѧÕâ¸ö·½Ïò£¿
2.ÔÚjavaÁìÓòÖ÷ ......
´úÂë:
timeout = 10
socket.setdefaulttimeout(timeout)
sock = urllib2.urlopen(url)
html = sock.read()
Ò»°ãÇé¿öÄÜÐУ¬ÔËÐÐûÎÊÌ⣠......