我以后要上傳一個(gè)課程叫《從小白到python 全棧工程師》,而且要風(fēng)趣幽默,解說詳細(xì)。而且,免費(fèi)!
2018-03-30
為什么用tuple 不用dict,課程里不是說了嗎,urls 里面的正則范圍最大的寫在最后,這樣才有效,個(gè)人從功能理解,這當(dāng)然就不能用dict替代咯,元組是有序的dict是無序的。當(dāng)然至于為什么用,這是py 框架吧,沒見過誰將框架講那么細(xì)的。
python3要用pymysql
conn=pymysql.connect(host='localhost',port=3306,user='root',passwd='123456',db='test',charset='utf8')
cur=conn.cursor()
cur.execute("select * from article")
r=cur.fetchall()
cur.close()
conn.close()
print(r)
return render.article(r)
conn=pymysql.connect(host='localhost',port=3306,user='root',passwd='123456',db='test',charset='utf8')
cur=conn.cursor()
cur.execute("select * from article")
r=cur.fetchall()
cur.close()
conn.close()
print(r)
return render.article(r)
2018-02-28
有網(wǎng)絡(luò)的情況下, cmd下輸入命令 pip3 install web.py==0.40.dev0 可以實(shí)現(xiàn)python3 環(huán)境下安裝
2018-02-28
python3安裝web.py各種報(bào)錯(cuò),如:ImportError: No module named ‘utils’
ModuleNotFoundError: No module named ‘db’等等。
解決方案如下:
pip install web.py==0.40.dev0
ModuleNotFoundError: No module named ‘db’等等。
解決方案如下:
pip install web.py==0.40.dev0
2018-02-13