随笔分类 -  DEV Language

摘要:printf 格式化输出 %d 十进制数字 %s 字符串 %c 字符 %e 指数浮点数 %f 浮点数 %i 整数(十进制) %o 八进制 %u 无符号十进制 %x 十六进制 %% 打印% % 打印% 阅读全文
posted @ 2022-03-27 16:04 linbo.yang 阅读(226) 评论(0) 推荐(0)
摘要: 阅读全文
posted @ 2022-03-27 16:02 linbo.yang 阅读(30) 评论(0) 推荐(0)
摘要:使用private关键字修饰的成员变量/方法 都可以被这个类的实例对象访问 ; 使用private[this]来修饰的成语变量 阅读全文
posted @ 2021-12-13 16:51 linbo.yang 阅读(87) 评论(0) 推荐(0)
摘要:https://cloud.tencent.com/developer/article/1793531 方法使用陷阱: 1.return可以省略,Scala会使用函数体的最后一行代码作为返回值 2.如果函数体只有一行代码,可以省略花括号 ; 3.返回值类型如果能够推断出来,那么(:和返回值类型)可以 阅读全文
posted @ 2021-12-12 18:21 linbo.yang 阅读(41) 评论(0) 推荐(0)
摘要:""" 经验:符号常量总是优于字面常量,枚举类型是定义符号常量的最佳选择 """ from enum import Enum, unique import random @unique class Suite(Enum): """花色""" SPADE, HEART, CLUB, DIAMOND = 阅读全文
posted @ 2021-11-30 16:42 linbo.yang 阅读(92) 评论(0) 推荐(0)
摘要:pathlib.mkidr() p=pathlib.Path(__file__) print("*"*180) print(p.cwd()) print(p.cwd().joinpath("my/directory/somelog")) pathlib.Path(p.cwd().joinpath(" 阅读全文
posted @ 2021-11-23 18:18 linbo.yang 阅读(43) 评论(0) 推荐(0)
摘要:https://pythonguides.com/category/python-tutorials/python-tkinter/ from tkinter import * from tkinter.filedialog import asksaveasfile from tkinter imp 阅读全文
posted @ 2021-11-17 19:25 linbo.yang 阅读(1176) 评论(0) 推荐(0)
摘要:from tkinter import * ws = Tk() ws.title("Python Guides") ws.geometry("200x200") name_variable = StringVar() password_var = StringVar() def submit(): 阅读全文
posted @ 2021-11-17 19:20 linbo.yang 阅读(49) 评论(0) 推荐(0)
摘要:https://pythonguides.com/python-tkinter-save-text-to-file/ from tkinter import * from tkinter.ttk import * ws = Tk() ws.title("Python Guides") ws.geom 阅读全文
posted @ 2021-11-17 16:42 linbo.yang 阅读(77) 评论(0) 推荐(0)
摘要:https://tkdocs.com/tutorial/firstexample.html Code 1 from tkinter import * 2 from tkinter import ttk 3 4 5 def calculate(*args): 6 try: 7 value = floa 阅读全文
posted @ 2021-11-17 10:55 linbo.yang 阅读(54) 评论(0) 推荐(0)
摘要:scrolledtext import tkinter as tk from tkinter.scrolledtext import ScrolledText root = tk.Tk() scrolledText = ScrolledText(root, width=20, height=10) 阅读全文
posted @ 2021-11-12 17:41 linbo.yang 阅读(449) 评论(0) 推荐(0)
摘要:https://pythonguides.com/python-tkinter-treeview/#Python_Tkinter_Treeview_Table 1 import tkinter as tk 2 from tkinter import ttk 3 from tkinter import 阅读全文
posted @ 2021-11-08 16:28 linbo.yang 阅读(258) 评论(0) 推荐(0)
摘要:12306 出发: 0123456789 <-> 目的: 0123456789 □同城 日期: < 123456789 > 更多日期: □添加更多日期 多站: □启用 多站查询 发车: 00:00-24:00 筛选: □全部 □高铁 □动车 □Z直达 □T特快 □K快速 □其它 隐藏: □全选 □商 阅读全文
posted @ 2021-11-05 18:08 linbo.yang 阅读(98) 评论(0) 推荐(0)
摘要:转载:https://learnku.com/articles/38601 阅读全文
posted @ 2021-10-28 15:30 linbo.yang 阅读(41) 评论(0) 推荐(0)
摘要:参考: https://docs.python.org/zh-cn/3/library/pathlib.html#correspondence-to-tools-in-the-os-module Path.parents # 返回所有上级目录的列表 Path.parts # 分割路径 类似os.pa 阅读全文
posted @ 2021-09-26 12:32 linbo.yang 阅读(136) 评论(0) 推荐(0)
摘要:1 import tkinter as tk 2 from tkinter import ttk 3 def login(root): 4 login_frame = tk.Frame(root) 5 login_frame.grid(padx=15, pady=15) 6 ttk.Label(lo 阅读全文
posted @ 2021-09-24 10:02 linbo.yang 阅读(167) 评论(0) 推荐(0)
摘要:转载:https://blog.csdn.net/hepu8/article/details/90345072 1 # -*- coding: utf-8 -*- 2 import tkinter as tk #装载tkinter模块,用于Python3 3 from tkinter import 阅读全文
posted @ 2021-09-22 18:33 linbo.yang 阅读(340) 评论(0) 推荐(0)
摘要:转载:https://blog.csdn.net/hepu8/article/details/89417831 用Tkinter打造GUI开发工具(12)Tkinter小部件的grid布局部件的网格放置grid()方法是使用行列位置的方法放置部件。 grid()方法布局管理器会将控件放置到一个二维的 阅读全文
posted @ 2021-09-22 18:19 linbo.yang 阅读(443) 评论(0) 推荐(0)
摘要:转载:https://blog.csdn.net/hepu8/article/details/89115187 用Tkinter打造GUI开发工具(10)Tkinter的Frame框架部件Frame框架部件是Tkinter的容器部件,负责安排其它部件的位置,Frame组件采用在屏幕上的矩形区域组织布 阅读全文
posted @ 2021-09-22 18:05 linbo.yang 阅读(596) 评论(0) 推荐(0)
摘要:转载:https://blog.csdn.net/hepu8/article/details/88833912 1 # -*- coding: utf-8 -*- 2 import tkinter as tk #装载tkinter模块,用于Python3 3 import tkinter.font 阅读全文
posted @ 2021-09-22 17:18 linbo.yang 阅读(846) 评论(0) 推荐(0)