資源簡介
代碼片段和文件信息
#?這次將會是一次十分坎坷的練習……
#?期間暫停多次咨詢百度
#上次寫的時候忘記在每個組件里面加上父元素了……居然還正常運行這就離譜!
#這次修了一個bug……
from?tkinter?import?*
from?tkinter.font?import?*
root?=?Tk()
root.title(‘txt編輯器‘)
root.resizable(0?0)
def?a1():
????b?=?open(e1.get()?‘r+‘)
????t1.delete(0.0?END)
????t1.insert(‘end‘?b.read())
def?a2():
????b?=?open(e1.get()?‘w+‘)
????b.write(t1.get(0.0?‘end‘))
????c?=?b.close()
ft?=?Font(family=‘微軟雅黑‘?size=12)
l1?=?Label(root?text=‘change?the?world?b
- 上一篇:python疫情卡UN管控
- 下一篇:python 繪圖(方形、線條、圓形)
評論
共有 條評論