·¢²¼pythonÓ¦ÓóÌÐò
¡¾windows+python3.1.2¡¿
·¢²¼pythonÓ¦ÓóÌÐòÊǸöºÜÂé·³µÄÊ£¬ÒòΪ<1>ÎÞ·¨±àÒëÔÉúcode<2>ÿ¸ö°æ±¾µÄ×Ö½ÚÂ벻ͬ<3>Èç¹ûÖ±½ÓÉÏÔ´Âë»áËðº¦×Ô¼ºµÄÀûÒæ——µÈµÈ
·½·¨1——ÊÖ¶¯´ò°ü
Ôõô´ò°üÄØ£¿Ò»¸öpythonÎļþ¼ÐÒª¶þÊ®¶àMB°¡£¡
yes£¡ÎÒÃǾÍÒªÇåÀíÎÞÓõĶ«Î÷£¡
ÏÈдһ¸öwin.pyÎļþ£º
x = int(input("please a number: "))
print("your number is:",x)
ÔÙдrun.bat£º
@python -m py_compile win.py
@python win.pyc
@pause
È»ºó°ÑpythonÎļþ¼ÐÀïµÄÎļþÈ«²¿¸´ÖƵ½winºÍrunµÄĿ¼Ï¡£
ÏÖÔÚ¿ªÊ¼¾«¼ò——
1.ÏÈËÑË÷ËùÓеÄ.txt£¬É¾³ý
2.ɾ³ýDocĿ¼£¨ÄãÈÏΪÓû§»áÈ¥¿´pythonµÄÎĵµÂ𣿣©
3.ɾ³ýToolsĿ¼
ÏÖÔÚ¿ªÊ¼Åжϣ¬Óõ½tclû£¿Óõ½¶îÍâµÄ¿âû£¿Óõ½unicodeû£¿Óõ½ctypesû£¿È»ºó½øÈë¸÷¸öĿ¼½øÐÐɾ³ý¶îÍâµÄÎļþ¡£ÒòΪÎÒÃǵÄwin.pyʲô¶¼Ã»ÓÐÓõ½£¬ËùÒÔɾ³ý³ýÁËpython[.exe]ÍâµÄËùÓж«Î÷£¬¸ã¶¨£¡ÔËÐÐrun.batÕÕÑùÔËÐС£
È»ºó——´ò°üËùÐèµÄ¿â£¬ÔÙ°´ÏàͬµÄ°ì·¨È¥³ýÎÞÓõĶ«Î÷£¨ÎÒ²âÊÔʱÓÃ^x^vÀ´²âÊÔ£¬±È½Ï¼ò±ã£¬ÄãÈÏΪʲô·½·¨±È½Ï·½±ã£¿£©
·½·¨2——Óû§²Ù×÷
Õâ¸ö·½·¨¶ÔÔÛ±àдÕßÀ´Ëµ¼òµ¥£¬Ò²¾ÍÊÇÖ»´ò°ü³ÌÐòÓõ½µÄ¡¢RUNTIME²»×Ô´øµÄ¡¢¶ÔÔÛºÍÓû§À´Ëµ¶¼ÊǶîÍâµÄ——¿â£¬ÔÛ¹â´ò°üËü£¬ºÃÁË£¬Ð´¸öreadme£¬ÒªÇóÓû§ÊÖ¶¯ÏÂÔØruntime¼´¿É£¬²»¹ýΪÁËÒ»¸öС³ÌÐò¡¢¡¢×°¸ö¾ÓȻҪ20¶àMBµÄruntime¡£¡£¡£Óе㲻ֵ……
µ«ÊÇÄØ£¬¶Ô±È½Ï´óÐÍ¡¢¸´ÔÓ»òÊôÓÚÄÚ²¿½»Á÷ÀàÐ͵ijÌÐò£¬¿ÉÒÔÓÃÕâ¸ö·½·¨£»ÉõÖÁ£¬Äã¿ÉÒÔÖ»×°ÉÏ×Ö½ÚÂ룬дreadmeÒªÇóÓû§°ÑËùÐèµÄËùÓж«Î÷×°ºÃ¾ÍÐÐÁË!(²»¹ý¹À¼Æ¾Íû¶àÉÙÓû§ÁË)
ºÃÁË£¬ÕâÏÂÄã¾Í²»Óñ»py2exeÖ®ÀàµÄ³ÌÐò¡¢ÅäÖÃÃԻ󣬺úõØÓÃϵͳ×Ô´øµÄpyc°É£¡
Ïà¹ØÎĵµ£º
python µÄÄÚǶtimeÄ£°å·Ò뼰˵Ã÷
Ò»¡¢¼ò½é
timeÄ£¿éÌṩ¸÷ÖÖ²Ù×÷ʱ¼äµÄº¯Êý
˵Ã÷£ºÒ»°ãÓÐÁ½ÖÖ±íʾʱ¼äµÄ·½Ê½:
µÚÒ»ÖÖÊÇʱ¼ä´ÁµÄ·½Ê½(Ïà¶ÔÓÚ1970.1.1 00:00:00ÒÔÃë¼ÆËãµÄÆ«ÒÆÁ¿),ʱ¼ä´ÁÊÇΩһµÄ
µÚ¶þÖÖÒÔÊý× ......
def getText(self,nodelist):
rc=""
for node in nodelist:
if node.nodeType == node.TEXT_NODE or node.nodeType == node.CDATA_SECTION_NODE:
rc = rc + node.data
return rc
def parseXML(self,requesturl,xml):
dom = minidom.parse(requesturl)
for node in dom.getElementsByTagName('ca ......
ת×Ô£º
http://hi.baidu.com/feng2211/blog/item/8b86b6d9816a3f2710df9b79.html
ºÍ
http://i.19830102.com/archives/164
Python °æ±¾£º2.6
ÏÂÔصØÖ·£ºhttp://www.python.org/download/releases/2.6.1/
ÏÂÔØmsiÎļþ²¢°²×°
MySQLdb°æ±¾£º MySQL-python-1.2.2.win32-py2.6.exe
ÏÂÔصØÖ·£ºhttp://home.netimperia.com/ ......
conn = httplib.HTTPConnection(EPG_IP + ":" + HTTP_PORT)
url = FAV_URL_PARTH +"userid=" + USER_ID + FAV_DIR_MODIFY
param = '''<ps100request id="Favorite.Category.modify">
<categoryid>'''+categoryid+'''</categoryid>
<categoryname>'''+categoryname+'''</ ......
´úÂë+½á¹û£¬²»×ö½âÊÍ
µ±È»£¬¶ÔÓÚpythonûÓÐvirtual functionһ˵£¬¹À¼Æµ±×÷¶Ô±ÈÒ»¸öÀý×Ó¿´¿´°É¡£
#include <iostream>
using namespace std;
class base
{
public:
virtual void foo() { cout << "base" << endl; }
base() { foo() ;}
};
class derive: public base
{
pub ......