猫史档案馆


春风繁水

春风繁水

Lv.1

我......我是个人(滑稽)

获赞:112收藏:32浏览:2315作品收藏:4

签名:正在编写 python 前端

回复帖子评论
上一页2 页 / 共 7下一页

[代码岛3.0]招人啦! 中回复

我可以建筑

2020-06-26T12:59:42 点赞:0

我不相信你能打”乊“和”兦“。 中回复

乊兦

2020-06-27T13:25:38 点赞:0

【求助贴】有没有人会让程序弹出Windows通知啊! 中回复

center_image

是这样吗

2020-06-27T13:30:37 点赞:0

为什么打出…… 中回复

微信

2020-06-28T09:45:20 点赞:0

【有大佬吗】python菜鸟求助 中回复

import tkinter
import tkinter.messagebox as m
m.showwarning('标题','你的电脑要炸了')

2020-07-01T07:17:00 点赞:0

错在哪儿了 中回复

是因为你没有安装这个库

2020-07-01T07:22:24 点赞:0

本Python渣渣,求一个师父,有QQ的,进工作室的,膝盖给师父!!! 中回复

我3,6不行

2020-07-01T20:03:28 点赞:0

编程猫丨第一届Python选拔赛(非官方举办) 中回复

理论题怎么回答

2020-07-02T07:49:33 点赞:0

编程猫丨第一届Python选拔赛(非官方举办) 中回复

from tkinter import *
import tkinter.filedialog as f
import tkinter.colorchooser as c
import tkinter.messagebox as m
import tkinter.simpledialog as s
import sys
import os
import time
import calendar
str9=time.localtime(time.time())
str5=str(time.ctime())
root = Tk()
root.title('记事本')
root.width=400
root.weight=400
menubar = Menu(root)
text1=Text(root)
text1.pack(fill=BOTH,expand=True)
def ac():
    a7 = s.askinteger(title='年份询问',prompt='请输入日历的年份:', initialvalue=str9.tm_year)
    a8 = s.askinteger(title='月份询问',prompt='请输入日历的月份:', initialvalue=str9.tm_mon)
    cal = calendar.month(a7,a8)
    text1.insert(0.0,cal)
def at():
    text1.insert(0.0,str5)
def DN():
    text1.insert(0.0,os.getcwd())
def New():
    text1.delete('1.0',END)
def save():
    str1=text1.get(1.0,END)
    rs=f.asksaveasfilename(title='保存',filetype=[('python源文件','.py'),('文本','txt')])
    ff=open(rs,'w',encoding='utf-8')
    ff.write(str1)
    ff.close()
def window():
    text1.delete('1.0',END)
    rs=f.askopenfilename(title='打开',filetype=[('python源文件','.py'),('文本','txt')])
    try:
        ff=open(rs,'r',encoding='utf-8')
        str1=ff.read()
        text1.insert(0.0,str1)
    except:
        pass
    finally:
        ff.close()
def Quit():
    quit()
    sys.exit()
def textcolor():
    r1,r2=c.askcolor(title='字体颜色',color='red')
    text1.config(fg=r2)
def BGcolor():
    r1,r2=c.askcolor(title='页面颜色',color='red')
    text1.config(bg=r2)
def texthelp():
    m.showinfo(title='关于',message='这是一个关于记录时间的程序!')
def about():
    r3=s.askstring(title='帮助',prompt='具体请见官方文档!其余,请问您有什么问题吗?')
def change():
    str1=text1.get(1.0,END)
    r4=s.askstring(title='被替换',prompt='请输入要替换的字符:')
    r5=s.askstring(title='替换项',prompt='请输入要把他替换的项:')
    str2=''
    for x in str1:
        if str(r4) == x:
           str2 += str(r5)
        else:
            str2 += x
    text1.delete('1.0',END)
    text1.insert(0.0,str2)
filemenu=Menu(menubar,tearoff=False)
filemenu.a喵_command(label='新建',command=New)
filemenu.a喵_command(label='打开',command=window)
filemenu.a喵_separator()
filemenu.a喵_command(label='保存',command=save)
filemenu.a喵_command(label='退出',command=Quit)
menubar.a喵_cascade(label='文件',menu=filemenu)
root.config(menu=menubar)

Runmenu=Menu(menubar,tearoff=False)
Runmenu.a喵_command(label='字体颜色',command=textcolor)
Runmenu.a喵_separator()
Runmenu.a喵_command(label='页面颜色',command=BGcolor)
menubar.a喵_cascade(label='个性化',menu=Runmenu)
root.config(menu=menubar)
Windowmenu=Menu(menubar,tearoff=False)
Windowmenu.a喵_command(label='帮助',command=about)
Windowmenu.a喵_command(label='关于',command=texthelp)
menubar.a喵_cascade(label='关于',menu=Windowmenu)
root.config(menu=menubar)

Change=Menu(menubar,tearoff=False)
Change.a喵_command(label='替换',command=change)
menubar.a喵_cascade(label='替换',menu=Change)
root.config(menu=menubar)

Time=Menu(menubar,tearoff=False)
Time.a喵_command(label='时间',command=at)
Time.a喵_command(label='日历',command=ac)
menubar.a喵_cascade(label='添加',menu=Time)
root.config(menu=menubar)



mainloop()

2020-07-02T07:54:51 点赞:0

官方给我点赞了! 中回复

天啊

2020-07-02T11:07:33 点赞:0

在吗?????????? 中回复

emotion_编程猫_翻白眼

2020-07-02T13:22:04 点赞:0

神 奇 中回复

2020-07-02T19:33:00 点赞:0

发发你们的金币数量吧 中回复

center_image

2020-07-02T19:33:34 点赞:0

找师傅【凑字】 中回复

但是如果有想学python,ht ml(JavaScript,CSS)的,也是可以的哦

 

2020-07-02T19:53:44 点赞:0

Hello~大家好,本兔昨天进入了编程猫社区,初来乍到,请多多关照 中回复

你好啊

2020-07-02T19:55:18 点赞:0

找师傅【凑字】 中回复

会Kitten算法和联机的优先考虑

2020-07-02T20:10:31 点赞:0

发发你们的金币数量吧 中回复

为什么我发真实的数据你们都跟我说是F12啊

2020-07-02T21:25:21 点赞:0

电脑怎么拍照啊?哪位大佬教教我。 中回复

电脑拍照,是截屏吧

2020-07-02T21:56:14 点赞:0

找师傅啦! 中回复

渣渣路过

2020-07-02T21:57:11 点赞:0

在线收徒。 中回复

渣渣路过

2020-07-02T21:58:02 点赞:0

收徒弟。。 中回复

天花板

2020-07-02T21:59:17 点赞:0

在线找师傅 中回复

emotion_雷电猴_举手

2020-07-03T08:11:07 点赞:0

师傅~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 中回复

emotion_雷电猴_围观

2020-07-03T09:37:13 点赞:0

想知道门前流水的彩蛋吗?这里都有! 中回复

center_image

2020-07-05T14:32:16 点赞:0

想找个师傅 中回复

我阔以吗

2020-07-06T07:39:20 点赞:0

找个师傅在找几个徒弟 中回复

渣渣路过

2020-07-06T07:44:15 点赞:0

我能加入吗 中回复

????

2020-07-06T08:49:45 点赞:0

召唤@所有人(除非喵) 中回复

emotion_doge

2020-07-07T08:43:27 点赞:0

有工作室招人吗? 中回复

来我们工作室吗

2020-07-07T08:47:46 点赞:0

找师傅,求收 中回复

emotion_雷电猴_举手

2020-07-07T17:02:22 点赞:0