python-生僻字转拼音,python-生僻字拼音, 1 from t
python-生僻字转拼音,python-生僻字拼音, 1 from t
1 from tkinter import Tk, Text, Button, END, N, GROOVE 2 from pypinyin import pinyin 3 root = Tk() 4 root.geometry(‘540x200+600+340‘) #设置窗口大小 5 root.title(‘[汉字转拼音] Baylor的程序‘) #窗口标题 6 hztext = Text(root, width=20, height=10, font=‘微软雅黑,18‘) #窗口展示 7 hztext.grid(row=0, column=0) #窗口位置 8 9 #按钮 relief 设置框装饰 command 调用程序10 Button(root, text=‘转换‘, font=‘微软雅黑,18‘,relief = GROOVE,command = lambda: pytext.delete(‘1.0‘, END) or pytext.insert(‘1.0‘, pinyin(hztext.get(‘1.0‘, END), heteronym=True)[0:-1])).grid(row=0, column=1)11 12 pytext = Text(root, width=20, height=10, font=‘微软雅黑,18‘)13 pytext.grid(row=0, column=2)14 root.mainloop()15 16 #tkinter 介绍: https://www.cnblogs.com/wozijisun/p/8794882.html
#无法输入,只能粘贴进去
python-生僻字转拼音
相关内容
- python pyspark入门篇,pythonpyspark,一.环境介绍:1.安
- python--面向对象(最全讲解),python--面向对象,阅读目
- 解决python安装错误问题,python安装错误,遇到的问题描述
- Python从2.7.5升级到3.6.5,python2.7.53.6.5,Python从2.7
- Python 使用 Matplotlib 做图时,如何画竖直和水平的分割线
- python的强制转换(当出现 not supported between instances of
- Python3 Tkinter基础 Checkbutton 使用for循环生成多个 anchor
- python2除法保留真实结果,python2除法保留,python2和py
- python匹配两个字符串中间的字符串,python匹配,问题:使
- Sublime Text 3 插件SublimeCodeIntel for Python 安装步骤拆解及
评论关闭