知行编程网知行编程网  2022-07-30 08:00 知行编程网 隐藏边栏 |   抢沙发  7 
文章评分 0 次,平均分 0.0

8000字 | 详解 Tkinter 的 GUI 界面制作!

效果展示

本文为大家讲述了如何使用Tkinter制作一个简单的可视化界面工具。有时候,我们用代码实现了某些功能,如果可以为这个功能添加一个界面,是否会感觉倍儿爽?
在正式讲述文章之前,先来看看使用Tkinter做出来的最终效果吧!
8000字 | 详解 Tkinter 的 GUI 界面制作!

Tkinter简介

Tkinter(也叫 Tk 接口)是 Tk 图形用户界面工具包标准 的 Python 接口。
Tk 是一个轻量级的跨平台图形用户界面 (GUI)开发工具。Tk 和 Tkinter 可以运行在大多数 的 Unix 平台、Windows、和 Macintosh 系统。
由于Tkinter是Python自带的标准库,我们想要使用它的时候,只需直接导入即可。
<section style="overflow-x: auto;padding: 16px;background: rgb(39, 40, 34);color: rgb(221, 221, 221);display: -webkit-box;font-family: "Operator Mono", Consolas, Monaco, Menlo, monospace;border-radius: 0px;font-size: 12px;margin-left: 8px;margin-right: 8px;"><span style="font-size: 11px;"><span style="color: rgb(249, 38, 114);font-weight: bold;line-height: 26px;">from</span> tkinter <span style="color: rgb(249, 38, 114);font-weight: bold;line-height: 26px;">import</span> *</span></section>
Tkinter支持的组件有:
8000字 | 详解 Tkinter 的 GUI 界面制作!

Tkinter常用组件使用介绍

上述为大家列出了Tkinter中的常用组件。各个组件有其相对应的功能和用法,而我们可以根据我这些控件自由组合来展现出我们想要的效果。
这里先给大家简单介绍一下常用的,也是本文小工具里会用到的一些组件。

1. Button(按钮控件)

Button组件是用来触发事件的,它会在窗口上以按钮的方式显示,在你单击它的时候就会运行与Button绑定的函数。
<section style="overflow-x: auto;padding: 16px;background: rgb(39, 40, 34);color: rgb(221, 221, 221);display: -webkit-box;font-family: "Operator Mono", Consolas, Monaco, Menlo, monospace;border-radius: 0px;font-size: 12px;margin-left: 8px;margin-right: 8px;"><span style="font-size: 11px;"><span style="color: rgb(249, 38, 114);font-weight: bold;line-height: 26px;">from</span> tkinter <span style="color: rgb(249, 38, 114);font-weight: bold;line-height: 26px;">import</span> *<br  /><br  /><span style="line-height: 26px;"><span style="color: rgb(249, 38, 114);font-weight: bold;line-height: 26px;">def</span> <span style="color: rgb(166, 226, 46);font-weight: bold;line-height: 26px;">b1</span><span style="line-height: 26px;">()</span>:</span><br  />    root[<span style="color: rgb(166, 226, 46);line-height: 26px;">'bg'</span>] = <span style="color: rgb(166, 226, 46);line-height: 26px;">"blue"</span><br  />    <br  />root = Tk()<br  />str1 = <span style="color: rgb(166, 226, 46);line-height: 26px;">"Hello World"</span><br  />Button(root,text = str1,command = b1).place(x=<span style="line-height: 26px;">0</span>,y=<span style="line-height: 26px;">0</span>)<br  />root.mainloop()</span></section>
效果如下:
8000字 | 详解 Tkinter 的 GUI 界面制作!

2. Label(标签控件)

Label是标签控件,能在指定的窗口中显示的文本和图像。
<section style="overflow-x: auto;padding: 16px;background: rgb(39, 40, 34);color: rgb(221, 221, 221);display: -webkit-box;font-family: "Operator Mono", Consolas, Monaco, Menlo, monospace;border-radius: 0px;font-size: 12px;margin-left: 8px;margin-right: 8px;"><span style="font-size: 11px;"><span style="color: rgb(249, 38, 114);font-weight: bold;line-height: 26px;">from</span> tkinter <span style="color: rgb(249, 38, 114);font-weight: bold;line-height: 26px;">import</span> *<br  /><br  />root = Tk()<br  />str1 = <span style="color: rgb(166, 226, 46);line-height: 26px;">"Hello World"</span><br  />Label(root,text=str1).place(x=<span style="line-height: 26px;">0</span>,y=<span style="line-height: 26px;">0</span>)<br  />root.mainloop()</span></section>
效果如下:
8000字 | 详解 Tkinter 的 GUI 界面制作!

3. Entry(文本框)

Entry是文本框,用来让用户输入一行文本字符串,也可以用来显示文本字符串。在使用Entry的时候,我们需要用到一个函数stringVar(),这个函数定义的变量会被一直追踪,当你想要获得该变量当时的值,只需要用该变量的get函数。
<section style="overflow-x: auto;padding: 16px;background: rgb(39, 40, 34);color: rgb(221, 221, 221);display: -webkit-box;font-family: "Operator Mono", Consolas, Monaco, Menlo, monospace;border-radius: 0px;font-size: 12px;margin-left: 8px;margin-right: 8px;"><span style="font-size: 11px;"><span style="color: rgb(249, 38, 114);font-weight: bold;line-height: 26px;">from</span> tkinter <span style="color: rgb(249, 38, 114);font-weight: bold;line-height: 26px;">import</span> *<br  /><br  /><span style="font-size: 11px;line-height: 26px;"><span style="color: rgb(249, 38, 114);font-weight: bold;line-height: 26px;">def</span> <span style="color: rgb(166, 226, 46);font-weight: bold;line-height: 26px;">b1</span><span style="line-height: 26px;">()</span>:</span><br  />    print(str1.get())<br  /><br  />root = Tk()<br  />str1 = StringVar()<br  />str1.set(<span style="color: rgb(166, 226, 46);line-height: 26px;">"Hello world"</span>)<br  />Entry(root,textvariable = str1).place(x=<span style="line-height: 26px;">0</span>,y=<span style="line-height: 26px;">5</span>)<br  />Button(root,text = <span style="color: rgb(166, 226, 46);line-height: 26px;">"输出"</span>,command=b1).place(x=<span style="line-height: 26px;">150</span>,y=<span style="line-height: 26px;">0</span>)<br  />root.mainloop()</span></section>
效果如下:
8000字 | 详解 Tkinter 的 GUI 界面制作!

Tkinter常用几何管理方法使用介绍

上面介绍了一些组件,下面再为大家介绍一下Tkinter的一些几何管理方法。所谓的几何管理方法就是用来组织和管理整个父配件区中子配件的布局的
正是有这些几何方法的存在,我们才可以随心所欲的,将组件安排在我们想让它出现的地方,所有的Tkinter组件都包含专用的几何管理方法。

1. pack()

pack几何管理,采用块的方式组织配件,常用在开发简单的界面。pack几何管理程序根据组件创建生成的顺序,将组件添加到父组件中去。如果不指定任何选项,默认在父窗体中自顶向下添加组件。
<section style="overflow-x: auto;padding: 16px;background: rgb(39, 40, 34);color: rgb(221, 221, 221);display: -webkit-box;font-family: "Operator Mono", Consolas, Monaco, Menlo, monospace;border-radius: 0px;font-size: 12px;margin-left: 8px;margin-right: 8px;"><span style="font-size: 11px;"><span style="color: rgb(249, 38, 114);font-weight: bold;line-height: 26px;">from</span> tkinter <span style="color: rgb(249, 38, 114);font-weight: bold;line-height: 26px;">import</span> *<br  /><br  />root = Tk()<br  />Button(root,text=<span style="color: rgb(166, 226, 46);line-height: 26px;">'1'</span>,width=<span style="line-height: 26px;">5</span>).pack()<br  />Button(root,text=<span style="color: rgb(166, 226, 46);line-height: 26px;">'2'</span>,width=<span style="line-height: 26px;">5</span>).pack()<br  />Button(root,text=<span style="color: rgb(166, 226, 46);line-height: 26px;">'3'</span>,width=<span style="line-height: 26px;">5</span>).pack(side=<span style="color: rgb(166, 226, 46);line-height: 26px;">"left"</span>)<br  />Button(root,text=<span style="color: rgb(166, 226, 46);line-height: 26px;">'4'</span>,width=<span style="line-height: 26px;">5</span>).pack(side = <span style="color: rgb(166, 226, 46);line-height: 26px;">"right"</span>)<br  />Button(root,text=<span style="color: rgb(166, 226, 46);line-height: 26px;">'5'</span>,width=<span style="line-height: 26px;">5</span>).pack(side = <span style="color: rgb(166, 226, 46);line-height: 26px;">"bottom"</span>)<br  />Button(root,text=<span style="color: rgb(166, 226, 46);line-height: 26px;">'6'</span>,width=<span style="line-height: 26px;">5</span>).pack()<br  />root.mainloop()</span></section>
效果如下:
8000字 | 详解 Tkinter 的 GUI 界面制作!

2. grid()

grid几何管理,采用表格结构组织配件,通过行(row)列(column)来确定组件摆放的位置,这也是它的两个重要的参数。
<section style="overflow-x: auto;padding: 16px;background: rgb(39, 40, 34);color: rgb(221, 221, 221);display: -webkit-box;font-family: "Operator Mono", Consolas, Monaco, Menlo, monospace;border-radius: 0px;font-size: 12px;margin-left: 8px;margin-right: 8px;"><span style="font-size: 11px;"><span style="color: rgb(249, 38, 114);font-weight: bold;line-height: 26px;">from</span> tkinter <span style="color: rgb(249, 38, 114);font-weight: bold;line-height: 26px;">import</span> *<br  /><br  />root = Tk()<br  />Button(root,text=<span style="color: rgb(166, 226, 46);line-height: 26px;">'1'</span>,width=<span style="line-height: 26px;">5</span>).grid(row=<span style="line-height: 26px;">0</span>,column=<span style="line-height: 26px;">0</span>)<br  />Button(root,text=<span style="color: rgb(166, 226, 46);line-height: 26px;">'2'</span>,width=<span style="line-height: 26px;">5</span>).grid(row=<span style="line-height: 26px;">0</span>,column=<span style="line-height: 26px;">1</span>)<br  />Button(root,text=<span style="color: rgb(166, 226, 46);line-height: 26px;">'3'</span>,width=<span style="line-height: 26px;">5</span>).grid(row=<span style="line-height: 26px;">0</span>,column=<span style="line-height: 26px;">2</span>)<br  />Button(root,text=<span style="color: rgb(166, 226, 46);line-height: 26px;">'4'</span>,width=<span style="line-height: 26px;">5</span>).grid(row=<span style="line-height: 26px;">1</span>,column=<span style="line-height: 26px;">0</span>)<br  />Button(root,text=<span style="color: rgb(166, 226, 46);line-height: 26px;">'5'</span>,width=<span style="line-height: 26px;">5</span>).grid(row=<span style="line-height: 26px;">1</span>,column=<span style="line-height: 26px;">1</span>)<br  />Button(root,text=<span style="color: rgb(166, 226, 46);line-height: 26px;">'6'</span>,width=<span style="line-height: 26px;">5</span>).grid(row=<span style="line-height: 26px;">2</span>,column=<span style="line-height: 26px;">0</span>)<br  />root.mainloop()</span></section>
效果如下:
8000字 | 详解 Tkinter 的 GUI 界面制作!

3. place()

place几何管理,允许指定组件的大小以及位置,通过x和y的数值来确定组件的位置,通过width和height来确定组件的大小。
<section style="overflow-x: auto;padding: 16px;background: rgb(39, 40, 34);color: rgb(221, 221, 221);display: -webkit-box;font-family: "Operator Mono", Consolas, Monaco, Menlo, monospace;border-radius: 0px;font-size: 12px;margin-left: 8px;margin-right: 8px;"><span style="font-size: 11px;"><span style="color: rgb(249, 38, 114);font-weight: bold;line-height: 26px;">from</span> tkinter <span style="color: rgb(249, 38, 114);font-weight: bold;line-height: 26px;">import</span> *<br  /><br  />root = Tk()<br  />Button(root,text=<span style="color: rgb(166, 226, 46);line-height: 26px;">'1'</span>,width=<span style="line-height: 26px;">5</span>).place(x=<span style="line-height: 26px;">80</span>,y=<span style="line-height: 26px;">0</span>)<br  />Button(root,text=<span style="color: rgb(166, 226, 46);line-height: 26px;">'2'</span>,width=<span style="line-height: 26px;">5</span>).place(x=<span style="line-height: 26px;">80</span>,y=<span style="line-height: 26px;">170</span>)<br  />Button(root,text=<span style="color: rgb(166, 226, 46);line-height: 26px;">'3'</span>,width=<span style="line-height: 26px;">5</span>).place(x=<span style="line-height: 26px;">0</span>,y=<span style="line-height: 26px;">85</span>)<br  />Button(root,text=<span style="color: rgb(166, 226, 46);line-height: 26px;">'4'</span>,width=<span style="line-height: 26px;">5</span>).place(x=<span style="line-height: 26px;">155</span>,y=<span style="line-height: 26px;">85</span>)<br  />Button(root,text=<span style="color: rgb(166, 226, 46);line-height: 26px;">'5'</span>,width=<span style="line-height: 26px;">5</span>).place(x=<span style="line-height: 26px;">70</span>,y=<span style="line-height: 26px;">70</span>,width=<span style="line-height: 26px;">60</span>,height=<span style="line-height: 26px;">60</span>)<br  />root.mainloop()</span></section>
效果如下:
8000字 | 详解 Tkinter 的 GUI 界面制作!

Tkinter实现弹窗提示

有时候,我们想要实现一个弹窗提示功能。此时,可以使用tkinter.messagebox,这个也是Python自带的。在我们需要实现弹窗功能的时候,只需要将其导入,使用对应的函数,再输入对应的参数,一个小弹窗就做好了。
<section style="overflow-x: auto;padding: 16px;background: rgb(39, 40, 34);color: rgb(221, 221, 221);display: -webkit-box;font-family: "Operator Mono", Consolas, Monaco, Menlo, monospace;border-radius: 0px;font-size: 12px;margin-left: 8px;margin-right: 8px;"><span style="font-size: 11px;"><span style="color: rgb(249, 38, 114);font-weight: bold;line-height: 26px;">from</span> tkinter <span style="color: rgb(249, 38, 114);font-weight: bold;line-height: 26px;">import</span> *<br  /><span style="color: rgb(249, 38, 114);font-weight: bold;line-height: 26px;">import</span> tkinter.messagebox<br  /><br  /><span style="font-size: 11px;line-height: 26px;"><span style="color: rgb(249, 38, 114);font-weight: bold;line-height: 26px;">def</span> <span style="color: rgb(166, 226, 46);font-weight: bold;line-height: 26px;">b1</span><span style="line-height: 26px;">()</span>:</span><br  />    tkinter.messagebox.showinfo(title=<span style="color: rgb(166, 226, 46);line-height: 26px;">"危险"</span>, message=<span style="color: rgb(166, 226, 46);line-height: 26px;">"出错了"</span>)<br  /><br  />root = Tk()<br  />Button(root,text=<span style="color: rgb(166, 226, 46);line-height: 26px;">'1'</span>,command =b1 ).pack()<br  />root.mainloop()</span></section>
效果如下:
8000字 | 详解 Tkinter 的 GUI 界面制作!

Tkinter案例讲解

通过上述对Tkinter的讲解,我们基本可以上手制作一个属于自己的界面窗口了。最后,还是通过一个案例讲解,为大家讲述它的使用。
需求: 我写了一段自动化整理文件夹的窗口,但是想要制作一个界面,能够随意选择路径,当我点击桌面一键整理后,就可以完成文件夹的自动整理。
下面是最后制作的界面效果,基本功能都实现了,同时还多出了两个功能,复制所有文件名时间提示,是不是很棒?
8000字 | 详解 Tkinter 的 GUI 界面制作!
关于自动化整理文件夹的程序,黄同学已经给出了。我在他的基础上,结合Tkinter,最终制作出了这个界面。完整代码如下:
<section style="overflow-x: auto;padding: 16px;background: rgb(39, 40, 34);color: rgb(221, 221, 221);display: -webkit-box;font-family: "Operator Mono", Consolas, Monaco, Menlo, monospace;border-radius: 0px;font-size: 12px;margin-left: 8px;margin-right: 8px;"><span style="font-size: 11px;"><span style="color: rgb(249, 38, 114);font-weight: bold;line-height: 26px;">from</span> tkinter.filedialog <span style="color: rgb(249, 38, 114);font-weight: bold;line-height: 26px;">import</span> askdirectory<br  /><span style="color: rgb(249, 38, 114);font-weight: bold;line-height: 26px;">from</span> tkinter <span style="color: rgb(249, 38, 114);font-weight: bold;line-height: 26px;">import</span> *<br  /><span style="color: rgb(249, 38, 114);font-weight: bold;line-height: 26px;">import</span> time<br  /><span style="color: rgb(249, 38, 114);font-weight: bold;line-height: 26px;">import</span> datetime<br  /><span style="color: rgb(249, 38, 114);font-weight: bold;line-height: 26px;">import</span> os<br  /><span style="color: rgb(249, 38, 114);font-weight: bold;line-height: 26px;">import</span> shutil<br  /><span style="color: rgb(249, 38, 114);font-weight: bold;line-height: 26px;">import</span> pyperclip<br  /><span style="color: rgb(249, 38, 114);font-weight: bold;line-height: 26px;">import</span> tkinter.messagebox<br  /><br  /><span style="font-size: 11px;line-height: 26px;"><span style="color: rgb(249, 38, 114);font-weight: bold;line-height: 26px;">class</span> <span style="font-weight: bold;color: white;line-height: 26px;">MY_GUI</span><span style="line-height: 26px;">()</span>:</span><br  />    <span style="font-size: 11px;line-height: 26px;"><span style="color: rgb(249, 38, 114);font-weight: bold;line-height: 26px;">def</span> <span style="color: rgb(166, 226, 46);font-weight: bold;line-height: 26px;">__init__</span><span style="line-height: 26px;">(self,init_window_name)</span>:</span><br  />        self.init_window_name = init_window_name<br  />        self.path = StringVar()<br  /><br  />    <span style="font-size: 11px;line-height: 26px;"><span style="color: rgb(249, 38, 114);font-weight: bold;line-height: 26px;">def</span> <span style="color: rgb(166, 226, 46);font-weight: bold;line-height: 26px;">selectPath</span><span style="line-height: 26px;">(self)</span>:</span>           <span style="color: rgb(117, 113, 94);line-height: 26px;">#选择路径</span><br  />        path_ = askdirectory()<br  />        self.path.set(path_)<br  /><br  />    <span style="font-size: 11px;line-height: 26px;"><span style="color: rgb(249, 38, 114);font-weight: bold;line-height: 26px;">def</span> <span style="color: rgb(166, 226, 46);font-weight: bold;line-height: 26px;">error</span><span style="line-height: 26px;">(self)</span>:</span>    <span style="color: rgb(117, 113, 94);line-height: 26px;">#错误弹窗</span><br  />        tkinter.messagebox.showinfo(title=<span style="color: rgb(166, 226, 46);line-height: 26px;">"提示"</span>, message=<span style="color: rgb(166, 226, 46);line-height: 26px;">"未选择路径"</span>)<br  /><br  />    <span style="font-size: 11px;line-height: 26px;"><span style="color: rgb(249, 38, 114);font-weight: bold;line-height: 26px;">def</span> <span style="color: rgb(166, 226, 46);font-weight: bold;line-height: 26px;">uptime</span><span style="line-height: 26px;">(self)</span>:</span>   <span style="color: rgb(117, 113, 94);line-height: 26px;">#更新时间</span><br  />        TimeLabel[<span style="color: rgb(166, 226, 46);line-height: 26px;">"text"</span>] = datetime.datetime.now().strftime(<span style="color: rgb(166, 226, 46);line-height: 26px;">'%Y-%m-%d %H:%M:%S:'</span>) + <span style="color: rgb(166, 226, 46);line-height: 26px;">"%d"</span> % (datetime.datetime.now().microsecond // <span style="line-height: 26px;">100000</span>)<br  />        self.init_window_name.after(<span style="line-height: 26px;">100</span>, self.uptime)<br  /><br  />    <span style="color: rgb(117, 113, 94);line-height: 26px;">#设置窗口</span><br  />    <span style="font-size: 11px;line-height: 26px;"><span style="color: rgb(249, 38, 114);font-weight: bold;line-height: 26px;">def</span> <span style="color: rgb(166, 226, 46);font-weight: bold;line-height: 26px;">set_init_window</span><span style="line-height: 26px;">(self)</span>:</span><br  />        self.init_window_name.title(<span style="color: rgb(166, 226, 46);line-height: 26px;">"数据分析与统计学之美"</span>)                   <span style="color: rgb(117, 113, 94);line-height: 26px;">#窗口标题栏</span><br  />        self.init_window_name.geometry(<span style="color: rgb(166, 226, 46);line-height: 26px;">'300x300+600+300'</span>)               <span style="color: rgb(117, 113, 94);line-height: 26px;">#窗口大小,300x300是窗口的大小,+600是距离左边距的距离,+300是距离上边距的距离</span><br  />        self.init_window_name.resizable(width=FALSE, height=FALSE)      <span style="color: rgb(117, 113, 94);line-height: 26px;">#限制窗口大小,拒绝用户调整边框大小</span><br  />        Label(self.init_window_name, text=<span style="color: rgb(166, 226, 46);line-height: 26px;">"欢迎使用一键整理小工具"</span>,bg=<span style="color: rgb(166, 226, 46);line-height: 26px;">"SkyBlue"</span>,fg = <span style="color: rgb(166, 226, 46);line-height: 26px;">"Gray"</span>).place(x=<span style="line-height: 26px;">80</span>,y=<span style="line-height: 26px;">10</span>)  <span style="color: rgb(117, 113, 94);line-height: 26px;">#标签组件,用来显示内容,place里的x、y是标签组件放置的位置</span><br  />        Label(self.init_window_name, text=<span style="color: rgb(166, 226, 46);line-height: 26px;">"当前路径:"</span>,bg=<span style="color: rgb(166, 226, 46);line-height: 26px;">"SkyBlue"</span>).place(x=<span style="line-height: 26px;">15</span>,y=<span style="line-height: 26px;">50</span>)    <span style="color: rgb(117, 113, 94);line-height: 26px;">#标签组件,用来显示内容,place里的x、y是标签组件放置的位置</span><br  />        Entry(self.init_window_name, textvariable=self.path).place(x=<span style="line-height: 26px;">75</span>,y=<span style="line-height: 26px;">50</span>)           <span style="color: rgb(117, 113, 94);line-height: 26px;">#输入控件,用于显示简单的文本内容</span><br  />        Button(self.init_window_name, text=<span style="color: rgb(166, 226, 46);line-height: 26px;">"路径选择"</span>, command=self.selectPath,bg=<span style="color: rgb(166, 226, 46);line-height: 26px;">"SkyBlue"</span>).place(x=<span style="line-height: 26px;">225</span>,y=<span style="line-height: 26px;">45</span>)      <span style="color: rgb(117, 113, 94);line-height: 26px;">#按钮组件,用来触发某个功能或函数</span><br  />        Button(self.init_window_name, text=<span style="color: rgb(166, 226, 46);line-height: 26px;">"桌面一键整理"</span>,bg=<span style="color: rgb(166, 226, 46);line-height: 26px;">"SkyBlue"</span>,command=self.option).place(width=<span style="line-height: 26px;">200</span>,height=<span style="line-height: 26px;">50</span>,x=<span style="line-height: 26px;">50</span>,y=<span style="line-height: 26px;">100</span>) <span style="color: rgb(117, 113, 94);line-height: 26px;">#按钮组件,用来触发某个功能或函数</span><br  />        Button(self.init_window_name, text=<span style="color: rgb(166, 226, 46);line-height: 26px;">"复制所有文件名"</span>,bg=<span style="color: rgb(166, 226, 46);line-height: 26px;">"SkyBlue"</span>, command=self.option1).place(width=<span style="line-height: 26px;">200</span>, height=<span style="line-height: 26px;">50</span>, x=<span style="line-height: 26px;">50</span>, y=<span style="line-height: 26px;">180</span>)   <span style="color: rgb(117, 113, 94);line-height: 26px;">#按钮组件,用来触发某个功能或函数</span><br  />        self.init_window_name[<span style="color: rgb(166, 226, 46);line-height: 26px;">"bg"</span>] = <span style="color: rgb(166, 226, 46);line-height: 26px;">"SkyBlue"</span>                                   <span style="color: rgb(117, 113, 94);line-height: 26px;">#窗口背景色</span><br  />        self.init_window_name.attributes(<span style="color: rgb(166, 226, 46);line-height: 26px;">"-alpha"</span>,<span style="line-height: 26px;">0.8</span>)                          <span style="color: rgb(117, 113, 94);line-height: 26px;">#虚化,值越小虚化程度越高</span><br  />        <span style="color: rgb(249, 38, 114);font-weight: bold;line-height: 26px;">global</span> TimeLabel    <span style="color: rgb(117, 113, 94);line-height: 26px;">#全局变量</span><br  />        TimeLabel = Label(text=<span style="color: rgb(166, 226, 46);line-height: 26px;">"%s%d"</span> % (datetime.datetime.now().strftime(<span style="color: rgb(166, 226, 46);line-height: 26px;">'%Y-%m-%d %H:%M:%S:'</span>), datetime.datetime.now().microsecond // <span style="line-height: 26px;">100000</span>),bg=<span style="color: rgb(166, 226, 46);line-height: 26px;">"SkyBlue"</span>)   <span style="color: rgb(117, 113, 94);line-height: 26px;">#标签组件,显示时间</span><br  />        TimeLabel.place(x=<span style="line-height: 26px;">80</span>, y=<span style="line-height: 26px;">260</span>)<br  />        self.init_window_name.after(<span style="line-height: 26px;">100</span>,self.uptime)<br  /><br  />    <span style="font-size: 11px;line-height: 26px;"><span style="color: rgb(249, 38, 114);font-weight: bold;line-height: 26px;">def</span> <span style="color: rgb(166, 226, 46);font-weight: bold;line-height: 26px;">arrangement</span><span style="line-height: 26px;">(self,str1)</span>:</span>         <span style="color: rgb(117, 113, 94);line-height: 26px;">#整理文件</span><br  />        file_dict = {<br  />            <span style="color: rgb(166, 226, 46);line-height: 26px;">'图片'</span>: [<span style="color: rgb(166, 226, 46);line-height: 26px;">'jpg'</span>, <span style="color: rgb(166, 226, 46);line-height: 26px;">'png'</span>, <span style="color: rgb(166, 226, 46);line-height: 26px;">'gif'</span>, <span style="color: rgb(166, 226, 46);line-height: 26px;">'webp'</span>],<br  />            <span style="color: rgb(166, 226, 46);line-height: 26px;">'视频'</span>: [<span style="color: rgb(166, 226, 46);line-height: 26px;">'rmvb'</span>, <span style="color: rgb(166, 226, 46);line-height: 26px;">'mp4'</span>, <span style="color: rgb(166, 226, 46);line-height: 26px;">'avi'</span>, <span style="color: rgb(166, 226, 46);line-height: 26px;">'mkv'</span>, <span style="color: rgb(166, 226, 46);line-height: 26px;">'flv'</span>],<br  />            <span style="color: rgb(166, 226, 46);line-height: 26px;">"音频"</span>: [<span style="color: rgb(166, 226, 46);line-height: 26px;">'cd'</span>, <span style="color: rgb(166, 226, 46);line-height: 26px;">'wave'</span>, <span style="color: rgb(166, 226, 46);line-height: 26px;">'aiff'</span>, <span style="color: rgb(166, 226, 46);line-height: 26px;">'mpeg'</span>, <span style="color: rgb(166, 226, 46);line-height: 26px;">'mp3'</span>, <span style="color: rgb(166, 226, 46);line-height: 26px;">'mpeg-4'</span>],<br  />            <span style="color: rgb(166, 226, 46);line-height: 26px;">'文档'</span>: [<span style="color: rgb(166, 226, 46);line-height: 26px;">'xls'</span>, <span style="color: rgb(166, 226, 46);line-height: 26px;">'xlsx'</span>, <span style="color: rgb(166, 226, 46);line-height: 26px;">'csv'</span>, <span style="color: rgb(166, 226, 46);line-height: 26px;">'doc'</span>, <span style="color: rgb(166, 226, 46);line-height: 26px;">'docx'</span>, <span style="color: rgb(166, 226, 46);line-height: 26px;">'ppt'</span>, <span style="color: rgb(166, 226, 46);line-height: 26px;">'pptx'</span>, <span style="color: rgb(166, 226, 46);line-height: 26px;">'pdf'</span>, <span style="color: rgb(166, 226, 46);line-height: 26px;">'txt'</span>],<br  />            <span style="color: rgb(166, 226, 46);line-height: 26px;">'压缩文件'</span>: [<span style="color: rgb(166, 226, 46);line-height: 26px;">'7z'</span>, <span style="color: rgb(166, 226, 46);line-height: 26px;">'ace'</span>, <span style="color: rgb(166, 226, 46);line-height: 26px;">'bz'</span>, <span style="color: rgb(166, 226, 46);line-height: 26px;">'jar'</span>, <span style="color: rgb(166, 226, 46);line-height: 26px;">'rar'</span>, <span style="color: rgb(166, 226, 46);line-height: 26px;">'tar'</span>, <span style="color: rgb(166, 226, 46);line-height: 26px;">'zip'</span>, <span style="color: rgb(166, 226, 46);line-height: 26px;">'gz'</span>],<br  />            <span style="color: rgb(166, 226, 46);line-height: 26px;">'常用格式'</span>: [<span style="color: rgb(166, 226, 46);line-height: 26px;">'json'</span>, <span style="color: rgb(166, 226, 46);line-height: 26px;">'xml'</span>, <span style="color: rgb(166, 226, 46);line-height: 26px;">'md'</span>, <span style="color: rgb(166, 226, 46);line-height: 26px;">'ximd'</span>],<br  />            <span style="color: rgb(166, 226, 46);line-height: 26px;">'程序脚本'</span>: [<span style="color: rgb(166, 226, 46);line-height: 26px;">'py'</span>, <span style="color: rgb(166, 226, 46);line-height: 26px;">'java'</span>, <span style="color: rgb(166, 226, 46);line-height: 26px;">'html'</span>, <span style="color: rgb(166, 226, 46);line-height: 26px;">'sql'</span>, <span style="color: rgb(166, 226, 46);line-height: 26px;">'r'</span>, <span style="color: rgb(166, 226, 46);line-height: 26px;">'css'</span>, <span style="color: rgb(166, 226, 46);line-height: 26px;">'cpp'</span>, <span style="color: rgb(166, 226, 46);line-height: 26px;">'c'</span>, <span style="color: rgb(166, 226, 46);line-height: 26px;">'sas'</span>, <span style="color: rgb(166, 226, 46);line-height: 26px;">'js'</span>, <span style="color: rgb(166, 226, 46);line-height: 26px;">'go'</span>],<br  />            <span style="color: rgb(166, 226, 46);line-height: 26px;">'可执行程序'</span>: [<span style="color: rgb(166, 226, 46);line-height: 26px;">'exe'</span>, <span style="color: rgb(166, 226, 46);line-height: 26px;">'bat'</span>, <span style="color: rgb(166, 226, 46);line-height: 26px;">'lnk'</span>, <span style="color: rgb(166, 226, 46);line-height: 26px;">'sys'</span>, <span style="color: rgb(166, 226, 46);line-height: 26px;">'com'</span>],<br  />            <span style="color: rgb(166, 226, 46);line-height: 26px;">'字体文件'</span>: [<span style="color: rgb(166, 226, 46);line-height: 26px;">'eot'</span>, <span style="color: rgb(166, 226, 46);line-height: 26px;">'otf'</span>, <span style="color: rgb(166, 226, 46);line-height: 26px;">'fon'</span>, <span style="color: rgb(166, 226, 46);line-height: 26px;">'font'</span>, <span style="color: rgb(166, 226, 46);line-height: 26px;">'ttf'</span>, <span style="color: rgb(166, 226, 46);line-height: 26px;">'ttc'</span>, <span style="color: rgb(166, 226, 46);line-height: 26px;">'woff'</span>, <span style="color: rgb(166, 226, 46);line-height: 26px;">'woff2'</span>]<br  />        }<br  />        os.chdir(str1)<br  />        folder = os.listdir(<span style="color: rgb(166, 226, 46);line-height: 26px;">'.'</span>)<br  />        <span style="color: rgb(249, 38, 114);font-weight: bold;line-height: 26px;">for</span> each <span style="color: rgb(249, 38, 114);font-weight: bold;line-height: 26px;">in</span> folder:<br  />            <span style="color: rgb(117, 113, 94);line-height: 26px;">#print(each.split('.')[-1])</span><br  />            <span style="color: rgb(249, 38, 114);font-weight: bold;line-height: 26px;">for</span> name,type <span style="color: rgb(249, 38, 114);font-weight: bold;line-height: 26px;">in</span> file_dict.items():<br  />                <span style="color: rgb(249, 38, 114);font-weight: bold;line-height: 26px;">if</span> each.split(<span style="color: rgb(166, 226, 46);line-height: 26px;">'.'</span>)[<span style="line-height: 26px;">-1</span>] <span style="color: rgb(249, 38, 114);font-weight: bold;line-height: 26px;">in</span> type:<br  />                    <span style="color: rgb(249, 38, 114);font-weight: bold;line-height: 26px;">if</span> <span style="color: rgb(249, 38, 114);font-weight: bold;line-height: 26px;">not</span> os.path.exists(name):<br  />                        os.mkdir(name)<br  />                    shutil.move(each,name)<br  />        tkinter.messagebox.showinfo(title=<span style="color: rgb(166, 226, 46);line-height: 26px;">"提示"</span>, message=<span style="color: rgb(166, 226, 46);line-height: 26px;">"整理完成"</span>)<br  /><br  />    <span style="font-size: 11px;line-height: 26px;"><span style="color: rgb(249, 38, 114);font-weight: bold;line-height: 26px;">def</span> <span style="color: rgb(166, 226, 46);font-weight: bold;line-height: 26px;">copy</span><span style="line-height: 26px;">(self,str1)</span>:</span><br  />        os.chdir(str1)<br  />        folder = os.listdir(<span style="color: rgb(166, 226, 46);line-height: 26px;">'.'</span>)<br  />        str1 = <span style="color: rgb(166, 226, 46);line-height: 26px;">''</span><br  />        <span style="color: rgb(249, 38, 114);font-weight: bold;line-height: 26px;">for</span> each <span style="color: rgb(249, 38, 114);font-weight: bold;line-height: 26px;">in</span> folder:<br  />            type = <span style="color: rgb(166, 226, 46);line-height: 26px;">'.'</span> + each.split(<span style="color: rgb(166, 226, 46);line-height: 26px;">'.'</span>)[<span style="line-height: 26px;">-1</span>]<br  />            str1 = str1 + each.replace(type,<span style="color: rgb(166, 226, 46);line-height: 26px;">''</span>) + <span style="color: rgb(166, 226, 46);line-height: 26px;">'n'</span><br  />        pyperclip.copy(str1)<br  />    <span style="color: rgb(117, 113, 94);line-height: 26px;">#获取当前时间</span><br  />    <span style="font-size: 11px;line-height: 26px;"><span style="color: rgb(249, 38, 114);font-weight: bold;line-height: 26px;">def</span> <span style="color: rgb(166, 226, 46);font-weight: bold;line-height: 26px;">get_current_time</span><span style="line-height: 26px;">(self)</span>:</span><br  />        current_time = time.strftime(<span style="color: rgb(166, 226, 46);line-height: 26px;">'%Y-%m-%d %H:%M:%S'</span>,time.localtime(time.time()))<br  />        <span style="color: rgb(249, 38, 114);font-weight: bold;line-height: 26px;">return</span> current_time<br  /><br  />    <span style="font-size: 11px;line-height: 26px;"><span style="color: rgb(249, 38, 114);font-weight: bold;line-height: 26px;">def</span> <span style="color: rgb(166, 226, 46);font-weight: bold;line-height: 26px;">option</span><span style="line-height: 26px;">(self)</span>:</span><br  />        <span style="color: rgb(249, 38, 114);font-weight: bold;line-height: 26px;">if</span> self.path.get() == <span style="color: rgb(166, 226, 46);line-height: 26px;">""</span>:<br  />            self.error()<br  />        <span style="color: rgb(249, 38, 114);font-weight: bold;line-height: 26px;">else</span>:<br  />            self.arrangement(self.path.get())<br  /><br  />    <span style="font-size: 11px;line-height: 26px;"><span style="color: rgb(249, 38, 114);font-weight: bold;line-height: 26px;">def</span> <span style="color: rgb(166, 226, 46);font-weight: bold;line-height: 26px;">option1</span><span style="line-height: 26px;">(self)</span>:</span><br  />        <span style="color: rgb(249, 38, 114);font-weight: bold;line-height: 26px;">if</span> self.path.get() == <span style="color: rgb(166, 226, 46);line-height: 26px;">""</span>:<br  />            self.error()<br  />        <span style="color: rgb(249, 38, 114);font-weight: bold;line-height: 26px;">else</span>:<br  />            self.copy(self.path.get())<br  /><br  /><br  /><span style="color: rgb(249, 38, 114);font-weight: bold;line-height: 26px;">if</span> __name__ == <span style="color: rgb(166, 226, 46);line-height: 26px;">'__main__'</span>:<br  />    init_window = Tk()  <span style="color: rgb(117, 113, 94);line-height: 26px;"># 实例化出一个父窗口</span><br  />    ZMJ_PORTAL = MY_GUI(init_window)<br  />    ZMJ_PORTAL.set_init_window()<br  />    init_window.mainloop()</span></section>
从代码里可以看到,为了窗口的整体美观,我们规定了窗口的大小。
<section style="overflow-x: auto;padding: 16px;background: rgb(39, 40, 34);color: rgb(221, 221, 221);display: -webkit-box;font-family: "Operator Mono", Consolas, Monaco, Menlo, monospace;border-radius: 0px;font-size: 12px;margin-left: 8px;margin-right: 8px;"><span style="font-size: 11px;"><span style="color: rgb(117, 113, 94);line-height: 26px;">#窗口大小,300x300是窗口的大小,+600是距离左边距的距离,+300是距离上边距的距离</span><br  />self.init_window_name.geometry(<span style="color: rgb(166, 226, 46);line-height: 26px;">'300x300+600+300'</span>)    </span><span style="font-size: 15px;">           <br  /></span></section>
还设置了窗口的基本属性。
<section style="overflow-x: auto;padding: 16px;background: rgb(39, 40, 34);color: rgb(221, 221, 221);display: -webkit-box;font-family: "Operator Mono", Consolas, Monaco, Menlo, monospace;border-radius: 0px;font-size: 12px;margin-left: 8px;margin-right: 8px;"><span style="font-size: 11px;"><span style="color: rgb(117, 113, 94);line-height: 26px;">#窗口标题栏</span><br  />self.init_window_name.title(<span style="color: rgb(166, 226, 46);line-height: 26px;">"数据分析与统计学之美"</span>)    <br  /><br  /><span style="color: rgb(117, 113, 94);line-height: 26px;">#限制窗口大小,拒绝用户调整边框大小   </span><br  />self.init_window_name.resizable(width=FALSE, height=FALSE)  <br  />  <br  /><span style="color: rgb(117, 113, 94);line-height: 26px;">#虚化,值越小虚化程度越高  </span><br  />self.init_window_name.attributes(<span style="color: rgb(166, 226, 46);line-height: 26px;">"-alpha"</span>,<span style="line-height: 26px;">0.8</span>)      <br  /><br  /><span style="color: rgb(117, 113, 94);line-height: 26px;">#窗口背景色                    </span><br  />self.init_window_name[<span style="color: rgb(166, 226, 46);line-height: 26px;">"bg"</span>] = <span style="color: rgb(166, 226, 46);line-height: 26px;">"SkyBlue"</span>  </span><span style="font-size: 15px;">                                 <br  /></span></section>
所有组件都用了place几何方法,将组件的大小及布局,进行了良好的规划。同时,Button组件也都与其对应的功能函数,进行了链接。
<section style="overflow-x: auto;padding: 16px;background: rgb(39, 40, 34);color: rgb(221, 221, 221);display: -webkit-box;font-family: "Operator Mono", Consolas, Monaco, Menlo, monospace;border-radius: 0px;font-size: 12px;margin-left: 8px;margin-right: 8px;"><span style="font-size: 11px;"><span style="color: rgb(117, 113, 94);line-height: 26px;">#标签组件,用来显示内容,place里的x、y是标签组件放置的位置</span><br  />Label(self.init_window_name, text=<span style="color: rgb(166, 226, 46);line-height: 26px;">"欢迎使用一键整理小工具"</span>,bg=<span style="color: rgb(166, 226, 46);line-height: 26px;">"SkyBlue"</span>,fg = <span style="color: rgb(166, 226, 46);line-height: 26px;">"Gray"</span>).place(x=<span style="line-height: 26px;">80</span>,y=<span style="line-height: 26px;">10</span>)  <br  /><br  /><span style="color: rgb(117, 113, 94);line-height: 26px;">#标签组件,用来显示内容,place里的x、y是标签组件放置的位置</span><br  />Label(self.init_window_name, text=<span style="color: rgb(166, 226, 46);line-height: 26px;">"当前路径:"</span>,bg=<span style="color: rgb(166, 226, 46);line-height: 26px;">"SkyBlue"</span>).place(x=<span style="line-height: 26px;">15</span>,y=<span style="line-height: 26px;">50</span>)  <br  /><br  /><span style="color: rgb(117, 113, 94);line-height: 26px;">#输入控件,用于显示简单的文本内容</span><br  />Entry(self.init_window_name, textvariable=self.path).place(x=<span style="line-height: 26px;">75</span>,y=<span style="line-height: 26px;">50</span>)  <br  /><br  /><span style="color: rgb(117, 113, 94);line-height: 26px;">#按钮组件,用来触发某个功能或函数         </span><br  />Button(self.init_window_name, text=<span style="color: rgb(166, 226, 46);line-height: 26px;">"路径选择"</span>,command=self.selectPath,bg=<span style="color: rgb(166, 226, 46);line-height: 26px;">"SkyBlue"</span>).place(x=<span style="line-height: 26px;">225</span>,y=<span style="line-height: 26px;">45</span>)    <br  /><br  /><span style="color: rgb(117, 113, 94);line-height: 26px;">#按钮组件,用来触发某个功能或函数</span><br  />Button(self.init_window_name, text=<span style="color: rgb(166, 226, 46);line-height: 26px;">"桌面一键整理"</span>,bg=<span style="color: rgb(166, 226, 46);line-height: 26px;">"SkyBlue"</span>,command=self.option).place(width=<span style="line-height: 26px;">200</span>,height=<span style="line-height: 26px;">50</span>,x=<span style="line-height: 26px;">50</span>,y=<span style="line-height: 26px;">100</span>) <br  /><br  /><span style="color: rgb(117, 113, 94);line-height: 26px;">#按钮组件,用来触发某个功能或函数</span><br  />Button(self.init_window_name, text=<span style="color: rgb(166, 226, 46);line-height: 26px;">"复制所有文件名"</span>,bg=<span style="color: rgb(166, 226, 46);line-height: 26px;">"SkyBlue"</span>, command=self.option1).place(width=<span style="line-height: 26px;">200</span>, height=<span style="line-height: 26px;">50</span>, x=<span style="line-height: 26px;">50</span>, y=<span style="line-height: 26px;">180</span>)   </span></section>
如果路径为空的时候,需要制作一个弹窗提示:未选择路径。
<section style="overflow-x: auto;padding: 16px;background: rgb(39, 40, 34);color: rgb(221, 221, 221);display: -webkit-box;font-family: "Operator Mono", Consolas, Monaco, Menlo, monospace;border-radius: 0px;font-size: 12px;margin-left: 8px;margin-right: 8px;"><span style="font-size: 11px;"><span style="font-size: 11px;line-height: 26px;"><span style="color: rgb(249, 38, 114);font-weight: bold;line-height: 26px;">def</span> <span style="color: rgb(166, 226, 46);font-weight: bold;line-height: 26px;">option</span><span style="line-height: 26px;">(self)</span>:</span><br  />    <span style="color: rgb(249, 38, 114);font-weight: bold;line-height: 26px;">if</span> self.path.get() == <span style="color: rgb(166, 226, 46);line-height: 26px;">""</span>:<br  />        self.error()<br  />    <span style="color: rgb(249, 38, 114);font-weight: bold;line-height: 26px;">else</span>:<br  />        self.arrangement(self.path.get())<br  />           <br  />           <br  /><span style="font-size: 11px;line-height: 26px;"><span style="color: rgb(249, 38, 114);font-weight: bold;line-height: 26px;">def</span> <span style="color: rgb(166, 226, 46);font-weight: bold;line-height: 26px;">error</span><span style="line-height: 26px;">(self)</span>:</span>    <span style="color: rgb(117, 113, 94);line-height: 26px;">#错误弹窗</span><br  /> tkinter.messagebox.showinfo(title=<span style="color: rgb(166, 226, 46);line-height: 26px;">"提示"</span>, message=<span style="color: rgb(166, 226, 46);line-height: 26px;">"未选择路径"</span>)</span></section>

程序打包与代码获取

程序打包我采用的是pyinstaller命令,在使用该命令前,最重要的当然就是安装啦!
<section style="overflow-x: auto;padding: 16px;background: rgb(39, 40, 34);color: rgb(221, 221, 221);display: -webkit-box;font-family: "Operator Mono", Consolas, Monaco, Menlo, monospace;border-radius: 0px;font-size: 12px;margin-left: 8px;margin-right: 8px;"><span style="font-size: 11px;"><span style="color: rgb(117, 113, 94);line-height: 26px;">#安装</span><br  />pip install pyinstaller<br  /><br  /><span style="color: rgb(117, 113, 94);line-height: 26px;">#打包指令</span><br  />pyinstaller -F 数据分析与统计学之美.py</span></section>
在命令终端输入安装命令,下载安装pyinstaller。下载完成后再切换到存放.py文件的目录里,运行打包指令,待运行结束,我们可以看到目录里多出了一些文件夹和文件。
8000字 | 详解 Tkinter 的 GUI 界面制作!



<section style="outline: 0px;max-width: 100%;color: rgb(62, 62, 62);line-height: 1.6;letter-spacing: 0px;font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, "PingFang SC", Cambria, Cochin, Georgia, Times, "Times New Roman", serif;box-sizing: border-box !important;overflow-wrap: break-word !important;"><pre data-darkmode-bgcolor="rgb(36, 36, 36)" data-style="background-color: rgb(255, 255, 255); letter-spacing: 0.544px; font-size: 16px; text-align: center; color: rgba(230, 230, 230, 0.9) !important;" class="js_darkmode__45" data-darkmode-color="rgba(230, 230, 230, 0.9)" data-darkmode-original-color="rgba(230, 230, 230, 0.9)" data-darkmode-original-bgcolor="rgb(255, 255, 255)" style="outline: 0px;max-width: 100%;letter-spacing: 0.544px;box-sizing: border-box !important;overflow-wrap: break-word !important;color: rgba(230, 230, 230, 0.9) !important;"><section data-tool="mdnice编辑器" data-website="https://www.mdnice.com" style="padding: 10px;outline: 0px;max-width: 100%;color: black;line-height: 1.6;letter-spacing: 0px;word-break: break-word;text-align: left;font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, "PingFang SC", Cambria, Cochin, Georgia, Times, "Times New Roman", serif;font-size: 14px;box-sizing: border-box !important;overflow-wrap: break-word !important;"><pre style="outline: 0px;max-width: 100%;font-size: 16px;font-weight: 700;letter-spacing: 0.544px;widows: 1;caret-color: rgb(51, 51, 51);color: rgb(63, 63, 63);line-height: inherit;box-sizing: border-box !important;overflow-wrap: break-word !important;"><section data-role="outer" label="Powered by 135editor.com" data-darkmode-bgcolor="rgb(36, 36, 36)" data-darkmode-original-bgcolor="rgb(255, 255, 255)" data-darkmode-color="rgb(168, 168, 168)" data-darkmode-original-color="rgb(62, 62, 62)" data-style="max-width: 100%; font-family: -apple-system-font, BlinkMacSystemFont, "Helvetica Neue", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei UI", "Microsoft YaHei", Arial, sans-serif; font-size: 16px; letter-spacing: 0.544px; white-space: normal; background-color: rgb(255, 255, 255); color: rgb(62, 62, 62); text-align: left; box-sizing: border-box !important; overflow-wrap: break-word !important;" style="outline: 0px;max-width: 100%;font-family: -apple-system-font, BlinkMacSystemFont, "Helvetica Neue", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei UI", "Microsoft YaHei", Arial, sans-serif;letter-spacing: 0.544px;white-space: normal;color: rgb(62, 62, 62);box-sizing: border-box !important;overflow-wrap: break-word !important;"><section data-role="outer" label="Powered by 135editor.com" data-mpa-powered-by="yiban.io" style="outline: 0px;max-width: 100%;box-sizing: border-box !important;overflow-wrap: break-word !important;"><pre style="outline: 0px;max-width: 100%;letter-spacing: 0.544px;font-size: 15px;box-sizing: border-box !important;overflow-wrap: break-word !important;"><section data-role="outer" label="Powered by 135editor.com" style="outline: 0px;max-width: 100%;letter-spacing: 0.544px;white-space: normal;font-size: 16px;font-family: 微软雅黑, "Helvetica Nue", sans-serif;word-spacing: 1.6px;text-align: center;box-sizing: border-box !important;overflow-wrap: break-word !important;"><section style="outline: 0px;max-width: 100%;line-height: 1.6;letter-spacing: 0px;font-family: "Helvetica Neue", Helvetica, "Hiragino Sans GB", "Microsoft YaHei", Arial, sans-serif;box-sizing: border-box !important;overflow-wrap: break-word !important;"><pre data-darkmode-bgcolor="rgb(36, 36, 36)" data-style="background-color: rgb(255, 255, 255); color: rgba(230, 230, 230, 0.9); letter-spacing: 0.544px; text-size-adjust: auto; font-size: 16px; text-align: center; word-spacing: 1.6px;" data-darkmode-color="rgba(230, 230, 230, 0.9)" data-darkmode-original-color="rgba(230, 230, 230, 0.9)" data-darkmode-original-bgcolor="rgb(255, 255, 255)" data-darkmode-bgcolor-15862411819306="rgb(36, 36, 36)" data-darkmode-original-bgcolor-15862411819306="rgb(255, 255, 255)" data-darkmode-color-15862411819306="rgba(230, 230, 230, 0.9)" data-darkmode-original-color-15862411819306="rgba(230, 230, 230, 0.9)" data-darkmode-bgcolor-15862671987026="rgb(36, 36, 36)" data-darkmode-original-bgcolor-15862671987026="rgb(255, 255, 255)" data-darkmode-color-15862671987026="rgba(230, 230, 230, 0.9)" data-darkmode-original-color-15862671987026="rgba(230, 230, 230, 0.9)" data-darkmode-bgcolor-15864118999603="rgb(36, 36, 36)" data-darkmode-original-bgcolor-15864118999603="rgb(255, 255, 255)" data-darkmode-color-15864118999603="rgba(230, 230, 230, 0.9)" data-darkmode-original-color-15864118999603="rgba(230, 230, 230, 0.9)" data-darkmode-bgcolor-15864940858736="rgb(36, 36, 36)" data-darkmode-original-bgcolor-15864940858736="rgb(255, 255, 255)" data-darkmode-color-15864940858736="rgba(230, 230, 230, 0.9)" data-darkmode-original-color-15864940858736="rgba(230, 230, 230, 0.9)" data-darkmode-bgcolor-15869584691402="rgb(36, 36, 36)" data-darkmode-original-bgcolor-15869584691402="rgb(255, 255, 255)" data-darkmode-color-15869584691402="rgba(230, 230, 230, 0.9)" data-darkmode-original-color-15869584691402="rgba(230, 230, 230, 0.9)" data-darkmode-bgcolor-15869584691739="rgb(36, 36, 36)" data-darkmode-original-bgcolor-15869584691739="rgb(255, 255, 255)" data-darkmode-color-15869584691739="rgba(230, 230, 230, 0.9)" data-darkmode-original-color-15869584691739="rgba(230, 230, 230, 0.9)" data-darkmode-bgcolor-15873005456075="rgb(36, 36, 36)" data-darkmode-original-bgcolor-15873005456075="rgb(255, 255, 255)" data-darkmode-color-15873005456075="rgba(230, 230, 230, 0.9)" data-darkmode-original-color-15873005456075="rgba(230, 230, 230, 0.9)" data-darkmode-bgcolor-15873005456615="rgb(36, 36, 36)" data-darkmode-original-bgcolor-15873005456615="rgb(255, 255, 255)" data-darkmode-color-15873005456615="rgba(230, 230, 230, 0.9)" data-darkmode-original-color-15873005456615="rgba(230, 230, 230, 0.9)" data-darkmode-bgcolor-15886839320558="rgb(36, 36, 36)" data-darkmode-original-bgcolor-15886839320558="rgb(255, 255, 255)" data-darkmode-color-15886839320558="rgba(230, 230, 230, 0.9)" data-darkmode-original-color-15886839320558="rgba(230, 230, 230, 0.9)" data-darkmode-color-159923607914210="rgba(163, 163, 163, 0.9)" data-darkmode-original-color-159923607914210="rgba(230, 230, 230, 0.9)" data-darkmode-bgcolor-159923607914210="rgb(25, 25, 25)" data-darkmode-original-bgcolor-159923607914210="rgb(255, 255, 255)" data-darkmode-bgcolor-160008070860010="rgb(25, 25, 25)" data-darkmode-original-bgcolor-160008070860010="rgb(255, 255, 255)" data-darkmode-color-160008070860010="rgba(163, 163, 163, 0.9)" data-darkmode-original-color-160008070860010="rgba(230, 230, 230, 0.9)" data-darkmode-bgcolor-16072664870629="rgb(25, 25, 25)" data-darkmode-original-bgcolor-16072664870629="rgb(255, 255, 255)" data-darkmode-color-16072664870629="rgba(163, 163, 163, 0.9)" data-darkmode-original-color-16072664870629="rgba(230, 230, 230, 0.9)" data-darkmode-bgcolor-16073544711184="rgb(25, 25, 25)" data-darkmode-original-bgcolor-16073544711184="rgb(255, 255, 255)" data-darkmode-color-16073544711184="rgba(163, 163, 163, 0.9)" data-darkmode-original-color-16073544711184="rgba(230, 230, 230, 0.9)" style="outline: 0px;max-width: 100%;letter-spacing: 0.544px;word-spacing: 1.6px;box-sizing: border-box !important;overflow-wrap: break-word !important;"><pre data-darkmode-bgcolor="rgb(36, 36, 36)" data-style="background-color: rgb(255, 255, 255); color: rgba(230, 230, 230, 0.9); letter-spacing: 0.544px; text-size-adjust: auto; font-size: 16px; text-align: center; word-spacing: 1.6px;" data-darkmode-color="rgba(230, 230, 230, 0.9)" data-darkmode-original-color="rgba(230, 230, 230, 0.9)" data-darkmode-original-bgcolor="rgb(255, 255, 255)" data-darkmode-bgcolor-15862411819306="rgb(36, 36, 36)" data-darkmode-original-bgcolor-15862411819306="rgb(255, 255, 255)" data-darkmode-color-15862411819306="rgba(230, 230, 230, 0.9)" data-darkmode-original-color-15862411819306="rgba(230, 230, 230, 0.9)" data-darkmode-bgcolor-15862671987026="rgb(36, 36, 36)" data-darkmode-original-bgcolor-15862671987026="rgb(255, 255, 255)" data-darkmode-color-15862671987026="rgba(230, 230, 230, 0.9)" data-darkmode-original-color-15862671987026="rgba(230, 230, 230, 0.9)" data-darkmode-bgcolor-15864118999603="rgb(36, 36, 36)" data-darkmode-original-bgcolor-15864118999603="rgb(255, 255, 255)" data-darkmode-color-15864118999603="rgba(230, 230, 230, 0.9)" data-darkmode-original-color-15864118999603="rgba(230, 230, 230, 0.9)" data-darkmode-bgcolor-15864940858736="rgb(36, 36, 36)" data-darkmode-original-bgcolor-15864940858736="rgb(255, 255, 255)" data-darkmode-color-15864940858736="rgba(230, 230, 230, 0.9)" data-darkmode-original-color-15864940858736="rgba(230, 230, 230, 0.9)" data-darkmode-bgcolor-15869584691402="rgb(36, 36, 36)" data-darkmode-original-bgcolor-15869584691402="rgb(255, 255, 255)" data-darkmode-color-15869584691402="rgba(230, 230, 230, 0.9)" data-darkmode-original-color-15869584691402="rgba(230, 230, 230, 0.9)" data-darkmode-bgcolor-15869584691739="rgb(36, 36, 36)" data-darkmode-original-bgcolor-15869584691739="rgb(255, 255, 255)" data-darkmode-color-15869584691739="rgba(230, 230, 230, 0.9)" data-darkmode-original-color-15869584691739="rgba(230, 230, 230, 0.9)" data-darkmode-bgcolor-15873005456075="rgb(36, 36, 36)" data-darkmode-original-bgcolor-15873005456075="rgb(255, 255, 255)" data-darkmode-color-15873005456075="rgba(230, 230, 230, 0.9)" data-darkmode-original-color-15873005456075="rgba(230, 230, 230, 0.9)" data-darkmode-bgcolor-15873005456615="rgb(36, 36, 36)" data-darkmode-original-bgcolor-15873005456615="rgb(255, 255, 255)" data-darkmode-color-15873005456615="rgba(230, 230, 230, 0.9)" data-darkmode-original-color-15873005456615="rgba(230, 230, 230, 0.9)" data-darkmode-bgcolor-15886839320558="rgb(36, 36, 36)" data-darkmode-original-bgcolor-15886839320558="rgb(255, 255, 255)" data-darkmode-color-15886839320558="rgba(230, 230, 230, 0.9)" data-darkmode-original-color-15886839320558="rgba(230, 230, 230, 0.9)" data-darkmode-color-159923607914210="rgba(163, 163, 163, 0.9)" data-darkmode-original-color-159923607914210="rgba(230, 230, 230, 0.9)" data-darkmode-bgcolor-159923607914210="rgb(25, 25, 25)" data-darkmode-original-bgcolor-159923607914210="rgb(255, 255, 255)" data-darkmode-bgcolor-160008070860010="rgb(25, 25, 25)" data-darkmode-original-bgcolor-160008070860010="rgb(255, 255, 255)" data-darkmode-color-160008070860010="rgba(163, 163, 163, 0.9)" data-darkmode-original-color-160008070860010="rgba(230, 230, 230, 0.9)" data-darkmode-bgcolor-16072664870629="rgb(25, 25, 25)" data-darkmode-original-bgcolor-16072664870629="rgb(255, 255, 255)" data-darkmode-color-16072664870629="rgba(163, 163, 163, 0.9)" data-darkmode-original-color-16072664870629="rgba(230, 230, 230, 0.9)" data-darkmode-bgcolor-16073544711184="rgb(25, 25, 25)" data-darkmode-original-bgcolor-16073544711184="rgb(255, 255, 255)" data-darkmode-color-16073544711184="rgba(163, 163, 163, 0.9)" data-darkmode-original-color-16073544711184="rgba(230, 230, 230, 0.9)" style="outline: 0px;max-width: 100%;letter-spacing: 0.544px;word-spacing: 1.6px;box-sizing: border-box !important;overflow-wrap: break-word !important;"><p style="outline: 0px;max-width: 100%;min-height: 1em;font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei UI", "Microsoft YaHei", Arial, sans-serif;letter-spacing: 0.544px;white-space: normal;text-size-adjust: auto;text-align: left;box-sizing: border-box !important;overflow-wrap: break-word !important;"><img class="__bg_gif" data-ratio="0.08658008658008658"  data-type="gif" data-w="462" data-width="100%" style="outline: 0px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, "PingFang SC", Cambria, Cochin, Georgia, Times, "Times New Roman", serif;display: block;box-sizing: border-box !important;overflow-wrap: break-word !important;visibility: visible !important;width: 578px !important;" src="https://www.zkxjob.com/wp-content/uploads/2022/07/wxsync-2022-07-ae45c8833e6e59cceba3c2fda2df37d1.gif"  /></p><p style="outline: 0px;max-width: 100%;min-height: 1em;font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei UI", "Microsoft YaHei", Arial, sans-serif;letter-spacing: 0.544px;white-space: normal;text-size-adjust: auto;text-align: left;box-sizing: border-box !important;overflow-wrap: break-word !important;"><br style="outline: 0px;max-width: 100%;box-sizing: border-box !important;overflow-wrap: break-word !important;"  /></p>


推荐阅读:

入门: 最全的零基础学Python的问题  | 零基础学了8个月的Python  | 实战项目 |学Python就是这条捷径


<p style="outline: 0px;max-width: 100%;min-height: 1em;font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei UI", "Microsoft YaHei", Arial, sans-serif;letter-spacing: 0.544px;white-space: normal;text-align: left;box-sizing: border-box !important;overflow-wrap: break-word !important;"><span style="outline: 0px;max-width: 100%;letter-spacing: 0.544px;word-spacing: 1.6px;color: rgb(217, 33, 66);box-sizing: border-box !important;overflow-wrap: break-word !important;">量化</span><span style="outline: 0px;max-width: 100%;letter-spacing: 0.544px;word-spacing: 1.6px;box-sizing: border-box !important;overflow-wrap: break-word !important;">: </span><span style="outline: 0px;max-width: 100%;letter-spacing: 0.544px;word-spacing: 1.6px;text-decoration: underline;color: rgb(2, 30, 170);font-size: 14px;box-sizing: border-box !important;overflow-wrap: break-word !important;">定投基金到底能赚多少钱?</span><span style="outline: 0px;max-width: 100%;letter-spacing: 0.544px;word-spacing: 1.6px;color: rgb(2, 30, 170);font-size: 14px;box-sizing: border-box !important;overflow-wrap: break-word !important;">  | </span><span style="outline: 0px;max-width: 100%;letter-spacing: 0.544px;word-spacing: 1.6px;text-decoration: underline;color: rgb(2, 30, 170);font-size: 14px;box-sizing: border-box !important;overflow-wrap: break-word !important;">我用Python对去年800只基金的数据分析</span><span style="outline: 0px;max-width: 100%;letter-spacing: 0.544px;word-spacing: 1.6px;font-size: 14px;box-sizing: border-box !important;overflow-wrap: break-word !important;">  </span></p><p style="outline: 0px;max-width: 100%;min-height: 1em;font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei UI", "Microsoft YaHei", Arial, sans-serif;letter-spacing: 0.544px;white-space: normal;text-align: left;box-sizing: border-box !important;overflow-wrap: break-word !important;"><br style="outline: 0px;max-width: 100%;box-sizing: border-box !important;overflow-wrap: break-word !important;"  /></p>

干货:爬取豆瓣短评,电影《后来的我们》 | 38年NBA最佳球员分析 |   从万众期待到口碑扑街!唐探3令人失望  | 笑看新倚天屠龙记 | 灯谜答题王 |用Python做个海量小姐姐素描图 |碟中谍这么火,我用机器学习做个迷你推荐系统电影


趣味:弹球游戏  | 九宫格  | 漂亮的花 | 两百行Python《天天酷跑》游戏!


AI: 会做诗的机器人 | 给图片上色 | 预测收入 | 碟中谍这么火,我用机器学习做个迷你推荐系统电影


小工具: Pdf转Word,轻松搞定表格和水印! | 一键把html网页保存为pdf!|  再见PDF提取收费! | 用90行代码打造最强PDF转换器,word、PPT、excel、markdown、html一键转换 | 制作一款钉钉低价机票提示器! |60行代码做了一个语音壁纸切换器天天看小姐姐!


年度爆款文案

  • 1).卧槽!Pdf转Word用Python轻松搞定

  • 2).学Python真香!我用100行代码做了个网站,帮人PS旅行图片,赚个鸡腿吃

  • 3).首播过亿,火爆全网,我分析了《乘风破浪的姐姐》,发现了这些秘密 

  • 4).80行代码!用Python做一个哆来A梦分身 

  • 5).你必须掌握的20个python代码,短小精悍,用处无穷 

  • 6).30个Python奇淫技巧集 

  • 7).我总结的80页《菜鸟学Python精选干货.pdf》,都是干货 

  • 8).再见Python!我要学Go了!2500字深度分析!

  • 9).发现一个舔狗福利!这个Python爬虫神器太爽了,自动下载妹子图片


<section data-mpa-template="t" mpa-from-tpl="t" data-darkmode-bgcolor-15923650965579="rgb(36, 36, 36)" data-darkmode-original-bgcolor-15923650965579="rgb(255, 255, 255)" data-darkmode-color-15923650965579="rgb(168, 168, 168)" data-darkmode-original-color-15923650965579="rgb(62, 62, 62)" data-style="color: rgb(62, 62, 62); font-size: 15px; letter-spacing: 0.544px; background-color: rgb(255, 255, 255); font-family: monospace; text-align: left; widows: 1; word-spacing: 2px; caret-color: rgb(255, 0, 0); white-space: pre-wrap;" style="outline: 0px;max-width: 100%;font-size: 15px;letter-spacing: 0.544px;word-spacing: 2px;caret-color: rgb(255, 0, 0);color: rgb(62, 62, 62);white-space: pre-wrap;box-sizing: border-box !important;overflow-wrap: break-word !important;"><section mpa-from-tpl="t" data-darkmode-bgcolor-15923650965579="rgb(36, 36, 36)" data-darkmode-original-bgcolor-15923650965579="rgb(255, 255, 255)" data-darkmode-color-15923650965579="rgb(168, 168, 168)" data-darkmode-original-color-15923650965579="rgb(62, 62, 62)" style="outline: 0px;max-width: 100%;box-sizing: border-box !important;overflow-wrap: break-word !important;"><pre data-darkmode-bgcolor-15923650965579="rgb(36, 36, 36)" data-darkmode-original-bgcolor-15923650965579="rgb(255, 255, 255)" data-darkmode-color-15923650965579="rgb(167, 167, 167)" data-darkmode-original-color-15923650965579="rgb(63, 63, 63)" data-style="letter-spacing: 0.544px; font-size: 16px; color: rgb(63, 63, 63); word-spacing: 1px; line-height: inherit;" style="outline: 0px;max-width: 100%;letter-spacing: 0.544px;font-size: 16px;color: rgb(63, 63, 63);word-spacing: 1px;line-height: inherit;box-sizing: border-box !important;overflow-wrap: break-word !important;"><section data-mpa-template-id="1250" data-mpa-color="#ffffff" data-mpa-category="divider" data-darkmode-bgcolor="rgb(36, 36, 36)" data-darkmode-original-bgcolor="rgb(255, 255, 255)" data-darkmode-color="rgb(230, 230, 230)" data-darkmode-original-color="rgb(0, 0, 0)" data-style="margin-right: 0.5em; margin-left: 0.5em; white-space: normal; font-family: -apple-system-font, system-ui, 'Helvetica Neue', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei UI', 'Microsoft YaHei', Arial, sans-serif; color: rgb(0, 0, 0); letter-spacing: 0px; word-spacing: 2px;" data-darkmode-bgcolor-15923650965579="rgb(36, 36, 36)" data-darkmode-original-bgcolor-15923650965579="rgb(255, 255, 255)" data-darkmode-color-15923650965579="rgb(230, 230, 230)" data-darkmode-original-color-15923650965579="rgb(0, 0, 0)" style="outline: 0px;max-width: 100%;box-sizing: border-box !important;overflow-wrap: break-word !important;"><pre data-darkmode-bgcolor-15923650965579="rgb(36, 36, 36)" data-darkmode-original-bgcolor-15923650965579="rgb(255, 255, 255)" data-darkmode-color-15923650965579="rgb(167, 167, 167)" data-darkmode-original-color-15923650965579="rgb(63, 63, 63)" data-style="letter-spacing: 0.544px; font-size: 16px; color: rgb(63, 63, 63); word-spacing: 1px; line-height: inherit;" style="outline: 0px;max-width: 100%;letter-spacing: 0.544px;line-height: inherit;box-sizing: border-box !important;overflow-wrap: break-word !important;"><section data-mpa-template-id="1250" data-mpa-color="#ffffff" data-mpa-category="divider" data-darkmode-bgcolor="rgb(36, 36, 36)" data-darkmode-original-bgcolor="rgb(255, 255, 255)" data-darkmode-color="rgb(230, 230, 230)" data-darkmode-original-color="rgb(0, 0, 0)" data-style="margin-right: 0.5em; margin-left: 0.5em; white-space: normal; font-family: -apple-system-font, system-ui, 'Helvetica Neue', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei UI', 'Microsoft YaHei', Arial, sans-serif; color: rgb(0, 0, 0); letter-spacing: 0px; word-spacing: 2px;" data-darkmode-bgcolor-15923650965579="rgb(36, 36, 36)" data-darkmode-original-bgcolor-15923650965579="rgb(255, 255, 255)" data-darkmode-color-15923650965579="rgb(230, 230, 230)" data-darkmode-original-color-15923650965579="rgb(0, 0, 0)" style="outline: 0px;max-width: 100%;box-sizing: border-box !important;overflow-wrap: break-word !important;"><section powered-by="xiumi.us" data-darkmode-bgcolor="rgb(36, 36, 36)" data-darkmode-original-bgcolor="rgb(255, 255, 255)" data-darkmode-color="rgb(230, 230, 230)" data-darkmode-original-color="rgb(0, 0, 0)" data-darkmode-bgcolor-15923650965579="rgb(36, 36, 36)" data-darkmode-original-bgcolor-15923650965579="rgb(255, 255, 255)" data-darkmode-color-15923650965579="rgb(230, 230, 230)" data-darkmode-original-color-15923650965579="rgb(0, 0, 0)" style="margin-right: 0em;margin-left: 0em;outline: 0px;max-width: 100%;box-sizing: border-box !important;overflow-wrap: break-word !important;"><section style="margin-right: 0.5em;margin-left: 0.5em;outline: 0px;max-width: 100%;box-sizing: border-box !important;overflow-wrap: break-word !important;"><section data-tool="mdnice编辑器" data-website="https://www.mdnice.com" style="outline: 0px;max-width: 100%;box-sizing: border-box !important;overflow-wrap: break-word !important;"><pre data-darkmode-bgcolor="rgb(36, 36, 36)" data-darkmode-original-bgcolor="rgb(255, 255, 255)" data-darkmode-color="rgb(168, 168, 168)" data-darkmode-original-color="rgb(62, 62, 62)" data-style="letter-spacing: 0.544px; font-weight: 700; text-align: -webkit-center; background-color: rgb(255, 255, 255); font-size: 16px; color: rgb(62, 62, 62); widows: 1; word-spacing: 2px;" style="outline: 0px;max-width: 100%;letter-spacing: 0.544px;text-align: center;color: rgb(62, 62, 62);box-sizing: border-box !important;overflow-wrap: break-word !important;"><section data-tool="mdnice编辑器" data-website="https://www.mdnice.com" style="outline: 0px;max-width: 100%;box-sizing: border-box !important;overflow-wrap: break-word !important;"><pre data-darkmode-bgcolor="rgb(36, 36, 36)" data-darkmode-original-bgcolor="rgb(255, 255, 255)" data-darkmode-color="rgb(168, 168, 168)" data-darkmode-original-color="rgb(62, 62, 62)" data-style="letter-spacing: 0.544px; font-weight: 700; text-align: -webkit-center; background-color: rgb(255, 255, 255); font-size: 16px; color: rgb(62, 62, 62); widows: 1; word-spacing: 2px;" style="outline: 0px;max-width: 100%;letter-spacing: 0.544px;box-sizing: border-box !important;overflow-wrap: break-word !important;"><pre style="outline: 0px;max-width: 100%;letter-spacing: 0.544px;text-align: left;box-sizing: border-box !important;overflow-wrap: break-word !important;"><h1 style="outline: 0px;max-width: 100%;white-space: pre-wrap;letter-spacing: 0.544px;font-family: 微软雅黑;box-sizing: border-box !important;overflow-wrap: break-word !important;"><section mpa-from-tpl="t" style="outline: 0px;max-width: 100%;box-sizing: border-box !important;overflow-wrap: break-word !important;"><pre style="outline: 0px;max-width: 100%;letter-spacing: 0.544px;line-height: inherit;box-sizing: border-box !important;overflow-wrap: break-word !important;"><section data-mpa-template="t" mpa-from-tpl="t" style="outline: 0px;max-width: 100%;box-sizing: border-box !important;overflow-wrap: break-word !important;"><section data-id="94086" data-color="#276ca3" data-tools="135编辑器" mpa-from-tpl="t" style="outline: 0px;max-width: 100%;box-sizing: border-box !important;overflow-wrap: break-word !important;"><section style="outline: 0px;max-width: 100%;box-sizing: border-box !important;overflow-wrap: break-word !important;"><section mpa-from-tpl="t" style="outline: 0px;max-width: 100%;box-sizing: border-box !important;overflow-wrap: break-word !important;"><pre style="outline: 0px;max-width: 100%;color: rgb(63, 63, 63);letter-spacing: 0.544px;line-height: inherit;box-sizing: border-box !important;overflow-wrap: break-word !important;"><section data-mpa-template="t" mpa-from-tpl="t" style="outline: 0px;max-width: 100%;box-sizing: border-box !important;overflow-wrap: break-word !important;"><section data-id="94086" data-color="#276ca3" data-tools="135编辑器" mpa-from-tpl="t" style="outline: 0px;max-width: 100%;box-sizing: border-box !important;overflow-wrap: break-word !important;"><section style="outline: 0px;max-width: 100%;box-sizing: border-box !important;overflow-wrap: break-word !important;"><section mpa-from-tpl="t" style="outline: 0px;max-width: 100%;display: inline-block;box-sizing: border-box !important;overflow-wrap: break-word !important;"><pre style="outline: 0px;max-width: 100%;letter-spacing: 0.544px;line-height: inherit;box-sizing: border-box !important;overflow-wrap: break-word !important;"><pre data-darkmode-bgcolor-15882384789136="rgb(36, 36, 36)" data-darkmode-original-bgcolor-15882384789136="rgb(255, 255, 255)" data-style="letter-spacing: 0.544px; background-color: rgb(255, 255, 255); text-align: center; color: rgba(230, 230, 230, 0.9); font-size: 16px; line-height: 25.6px; overflow-wrap: break-word !important;" data-darkmode-bgcolor-15882396318564="rgb(36, 36, 36)" data-darkmode-original-bgcolor-15882396318564="rgb(255, 255, 255)" data-darkmode-color-15882396318564="rgba(230, 230, 230, 0.9)" data-darkmode-original-color-15882396318564="rgba(230, 230, 230, 0.9)" data-darkmode-bgcolor-15900529136199="rgb(36, 36, 36)" data-darkmode-original-bgcolor-15900529136199="rgb(255, 255, 255)" data-darkmode-color-15900529136199="rgba(230, 230, 230, 0.9)" data-darkmode-original-color-15900529136199="rgba(230, 230, 230, 0.9)" style="outline: 0px;max-width: 100%;letter-spacing: 0.544px;text-align: center;color: rgba(230, 230, 230, 0.9);line-height: 25.6px;box-sizing: border-box !important;overflow-wrap: break-word !important;"><section style="outline: 0px;max-width: 100%;box-sizing: border-box !important;overflow-wrap: break-word !important;"><section data-darkmode-bgcolor-15860613985508="rgb(36, 36, 36)" data-darkmode-original-bgcolor-15860613985508="rgb(255, 255, 255)" data-darkmode-color-15860613985508="rgb(230, 230, 230)" data-darkmode-original-color-15860613985508="rgb(0, 0, 0)" data-darkmode-bgcolor-15870356070738="rgb(36, 36, 36)" data-darkmode-original-bgcolor-15870356070738="rgb(255, 255, 255)" data-darkmode-color-15870356070738="rgb(230, 230, 230)" data-darkmode-original-color-15870356070738="rgb(0, 0, 0)" data-darkmode-bgcolor-15870356071023="rgb(36, 36, 36)" data-darkmode-original-bgcolor-15870356071023="rgb(255, 255, 255)" data-darkmode-color-15870356071023="rgb(230, 230, 230)" data-darkmode-original-color-15870356071023="rgb(0, 0, 0)" data-darkmode-bgcolor-15882384789136="rgb(36, 36, 36)" data-darkmode-original-bgcolor-15882384789136="rgb(255, 255, 255)" data-darkmode-color-15882384789136="rgb(230, 230, 230)" data-darkmode-original-color-15882384789136="rgb(0, 0, 0)" data-darkmode-bgcolor-15882396318564="rgb(36, 36, 36)" data-darkmode-original-bgcolor-15882396318564="rgb(255, 255, 255)" data-darkmode-color-15882396318564="rgb(230, 230, 230)" data-darkmode-original-color-15882396318564="rgb(0, 0, 0)" data-darkmode-bgcolor-15900529136199="rgb(36, 36, 36)" data-darkmode-original-bgcolor-15900529136199="rgb(255, 255, 255)" data-darkmode-color-15900529136199="rgb(230, 230, 230)" data-darkmode-original-color-15900529136199="rgb(0, 0, 0)" style="outline: 0px;max-width: 100%;display: inline-block;clear: both;box-sizing: border-box !important;overflow-wrap: break-word !important;"><section data-tools="135编辑器" data-id="91842" data-darkmode-bgcolor-15860613985508="rgb(36, 36, 36)" data-darkmode-original-bgcolor-15860613985508="rgb(255, 255, 255)" data-darkmode-color-15860613985508="rgb(230, 230, 230)" data-darkmode-original-color-15860613985508="rgb(0, 0, 0)" data-darkmode-bgcolor-15870356070738="rgb(36, 36, 36)" data-darkmode-original-bgcolor-15870356070738="rgb(255, 255, 255)" data-darkmode-color-15870356070738="rgb(230, 230, 230)" data-darkmode-original-color-15870356070738="rgb(0, 0, 0)" data-darkmode-bgcolor-15870356071023="rgb(36, 36, 36)" data-darkmode-original-bgcolor-15870356071023="rgb(255, 255, 255)" data-darkmode-color-15870356071023="rgb(230, 230, 230)" data-darkmode-original-color-15870356071023="rgb(0, 0, 0)" data-darkmode-bgcolor-15882384789136="rgb(36, 36, 36)" data-darkmode-original-bgcolor-15882384789136="rgb(255, 255, 255)" data-darkmode-color-15882384789136="rgb(230, 230, 230)" data-darkmode-original-color-15882384789136="rgb(0, 0, 0)" data-darkmode-bgcolor-15882396318564="rgb(36, 36, 36)" data-darkmode-original-bgcolor-15882396318564="rgb(255, 255, 255)" data-darkmode-color-15882396318564="rgb(230, 230, 230)" data-darkmode-original-color-15882396318564="rgb(0, 0, 0)" data-darkmode-bgcolor-15900529136199="rgb(36, 36, 36)" data-darkmode-original-bgcolor-15900529136199="rgb(255, 255, 255)" data-darkmode-color-15900529136199="rgb(230, 230, 230)" data-darkmode-original-color-15900529136199="rgb(0, 0, 0)" style="outline: 0px;max-width: 100%;letter-spacing: 0.544px;border-width: 0px;border-style: none;border-color: initial;box-sizing: border-box !important;overflow-wrap: break-word !important;"><section data-darkmode-bgcolor-15860613985508="rgb(36, 36, 36)" data-darkmode-original-bgcolor-15860613985508="rgb(255, 255, 255)" data-darkmode-color-15860613985508="rgb(230, 230, 230)" data-darkmode-original-color-15860613985508="rgb(0, 0, 0)" data-darkmode-bgcolor-15870356070738="rgb(36, 36, 36)" data-darkmode-original-bgcolor-15870356070738="rgb(255, 255, 255)" data-darkmode-color-15870356070738="rgb(230, 230, 230)" data-darkmode-original-color-15870356070738="rgb(0, 0, 0)" data-darkmode-bgcolor-15870356071023="rgb(36, 36, 36)" data-darkmode-original-bgcolor-15870356071023="rgb(255, 255, 255)" data-darkmode-color-15870356071023="rgb(230, 230, 230)" data-darkmode-original-color-15870356071023="rgb(0, 0, 0)" data-darkmode-bgcolor-15882384789136="rgb(36, 36, 36)" data-darkmode-original-bgcolor-15882384789136="rgb(255, 255, 255)" data-darkmode-color-15882384789136="rgb(230, 230, 230)" data-darkmode-original-color-15882384789136="rgb(0, 0, 0)" data-darkmode-bgcolor-15882396318564="rgb(36, 36, 36)" data-darkmode-original-bgcolor-15882396318564="rgb(255, 255, 255)" data-darkmode-color-15882396318564="rgb(230, 230, 230)" data-darkmode-original-color-15882396318564="rgb(0, 0, 0)" data-darkmode-bgcolor-15900529136199="rgb(36, 36, 36)" data-darkmode-original-bgcolor-15900529136199="rgb(255, 255, 255)" data-darkmode-color-15900529136199="rgb(230, 230, 230)" data-darkmode-original-color-15900529136199="rgb(0, 0, 0)" style="outline: 0px;max-width: 100%;display: inline-block;clear: both;box-sizing: border-box !important;overflow-wrap: break-word !important;"><section data-brushtype="text" data-darkmode-bgcolor-15860613985508="rgb(36, 36, 36)" data-darkmode-original-bgcolor-15860613985508="rgb(255, 255, 255)" data-darkmode-color-15860613985508="rgb(230, 230, 230)" data-darkmode-original-color-15860613985508="rgb(0, 0, 0)" data-darkmode-bgimage-15860613985508="1" data-style="padding: 18px 15px 20px 10px; color: rgb(86, 146, 214); text-align: center; letter-spacing: 1.5px; background-image: url('https://www.zkxjob.com/wp-content/uploads/2022/07/wxsync-2022-07-a2a8a5e1e58f30392066a170034ee027.png'); background-size: 100% 100%; background-repeat: no-repeat; overflow-wrap: break-word !important;" data-darkmode-bgcolor-15870356070738="rgb(36, 36, 36)" data-darkmode-original-bgcolor-15870356070738="rgb(255, 255, 255)" data-darkmode-color-15870356070738="rgb(230, 230, 230)" data-darkmode-original-color-15870356070738="rgb(0, 0, 0)" data-darkmode-bgimage-15870356070738="1" data-darkmode-bgcolor-15870356071023="rgb(36, 36, 36)" data-darkmode-original-bgcolor-15870356071023="rgb(255, 255, 255)" data-darkmode-color-15870356071023="rgb(230, 230, 230)" data-darkmode-original-color-15870356071023="rgb(0, 0, 0)" data-darkmode-bgimage-15870356071023="1" data-darkmode-bgcolor-15882384789136="rgb(36, 36, 36)" data-darkmode-original-bgcolor-15882384789136="rgb(255, 255, 255)" data-darkmode-color-15882384789136="rgb(230, 230, 230)" data-darkmode-original-color-15882384789136="rgb(0, 0, 0)" data-darkmode-bgimage-15882384789136="1" data-darkmode-bgcolor-15882396318564="rgb(36, 36, 36)" data-darkmode-original-bgcolor-15882396318564="rgb(255, 255, 255)" data-darkmode-color-15882396318564="rgb(230, 230, 230)" data-darkmode-original-color-15882396318564="rgb(0, 0, 0)" data-darkmode-bgimage-15882396318564="1" data-darkmode-bgcolor-15900529136199="rgb(36, 36, 36)" data-darkmode-original-bgcolor-15900529136199="rgb(255, 255, 255)" data-darkmode-color-15900529136199="rgb(230, 230, 230)" data-darkmode-original-color-15900529136199="rgb(0, 0, 0)" data-darkmode-bgimage-15900529136199="1" style="padding: 18px 15px 20px 10px;outline: 0px;max-width: 100%;background-size: 100% 100%;background-image: url('https://www.zkxjob.com/wp-content/uploads/2022/07/wxsync-2022-07-a2a8a5e1e58f30392066a170034ee027.png');color: rgb(86, 146, 214);letter-spacing: 1.5px;background-repeat: no-repeat;box-sizing: border-box !important;overflow-wrap: break-word !important;"><section data-darkmode-bgcolor-15860613985508="rgb(36, 36, 36)" data-darkmode-original-bgcolor-15860613985508="rgb(255, 255, 255)" data-darkmode-color-15860613985508="rgb(230, 230, 230)" data-darkmode-original-color-15860613985508="rgb(0, 0, 0)" data-darkmode-bgimage-15860613985508="1" data-darkmode-bgcolor-15870356070738="rgb(36, 36, 36)" data-darkmode-original-bgcolor-15870356070738="rgb(255, 255, 255)" data-darkmode-color-15870356070738="rgb(230, 230, 230)" data-darkmode-original-color-15870356070738="rgb(0, 0, 0)" data-darkmode-bgimage-15870356070738="1" data-darkmode-bgcolor-15870356071023="rgb(36, 36, 36)" data-darkmode-original-bgcolor-15870356071023="rgb(255, 255, 255)" data-darkmode-color-15870356071023="rgb(230, 230, 230)" data-darkmode-original-color-15870356071023="rgb(0, 0, 0)" data-darkmode-bgimage-15870356071023="1" data-darkmode-bgcolor-15882384789136="rgb(36, 36, 36)" data-darkmode-original-bgcolor-15882384789136="rgb(255, 255, 255)" data-darkmode-color-15882384789136="rgb(230, 230, 230)" data-darkmode-original-color-15882384789136="rgb(0, 0, 0)" data-darkmode-bgimage-15882384789136="1" data-darkmode-bgcolor-15882396318564="rgb(36, 36, 36)" data-darkmode-original-bgcolor-15882396318564="rgb(255, 255, 255)" data-darkmode-color-15882396318564="rgb(230, 230, 230)" data-darkmode-original-color-15882396318564="rgb(0, 0, 0)" data-darkmode-bgimage-15882396318564="1" data-darkmode-bgcolor-15900529136199="rgb(36, 36, 36)" data-darkmode-original-bgcolor-15900529136199="rgb(255, 255, 255)" data-darkmode-color-15900529136199="rgb(230, 230, 230)" data-darkmode-original-color-15900529136199="rgb(0, 0, 0)" data-darkmode-bgimage-15900529136199="1" style="outline: 0px;max-width: 100%;display: flex;justify-content: center;align-items: center;box-sizing: border-box !important;overflow-wrap: break-word !important;"><section data-darkmode-bgcolor-15860613985508="rgb(36, 36, 36)" data-darkmode-original-bgcolor-15860613985508="rgb(255, 255, 255)" data-darkmode-color-15860613985508="rgb(230, 230, 230)" data-darkmode-original-color-15860613985508="rgb(0, 0, 0)" data-darkmode-bgimage-15860613985508="1" data-darkmode-bgcolor-15870356070738="rgb(36, 36, 36)" data-darkmode-original-bgcolor-15870356070738="rgb(255, 255, 255)" data-darkmode-color-15870356070738="rgb(230, 230, 230)" data-darkmode-original-color-15870356070738="rgb(0, 0, 0)" data-darkmode-bgimage-15870356070738="1" data-darkmode-bgcolor-15870356071023="rgb(36, 36, 36)" data-darkmode-original-bgcolor-15870356071023="rgb(255, 255, 255)" data-darkmode-color-15870356071023="rgb(230, 230, 230)" data-darkmode-original-color-15870356071023="rgb(0, 0, 0)" data-darkmode-bgimage-15870356071023="1" data-darkmode-bgcolor-15882384789136="rgb(36, 36, 36)" data-darkmode-original-bgcolor-15882384789136="rgb(255, 255, 255)" data-darkmode-color-15882384789136="rgb(230, 230, 230)" data-darkmode-original-color-15882384789136="rgb(0, 0, 0)" data-darkmode-bgimage-15882384789136="1" data-darkmode-bgcolor-15882396318564="rgb(36, 36, 36)" data-darkmode-original-bgcolor-15882396318564="rgb(255, 255, 255)" data-darkmode-color-15882396318564="rgb(230, 230, 230)" data-darkmode-original-color-15882396318564="rgb(0, 0, 0)" data-darkmode-bgimage-15882396318564="1" data-darkmode-bgcolor-15900529136199="rgb(36, 36, 36)" data-darkmode-original-bgcolor-15900529136199="rgb(255, 255, 255)" data-darkmode-color-15900529136199="rgb(230, 230, 230)" data-darkmode-original-color-15900529136199="rgb(0, 0, 0)" data-darkmode-bgimage-15900529136199="1" style="margin-left: 2px;outline: 0px;max-width: 100%;width: 20px;box-sizing: border-box !important;overflow-wrap: break-word !important;"></section><section data-brushtype="text" data-darkmode-bgcolor-15860613985508="rgb(36, 36, 36)" data-darkmode-original-bgcolor-15860613985508="rgb(255, 255, 255)" data-darkmode-color-15860613985508="rgb(51, 51, 51)" data-darkmode-original-color-15860613985508="rgb(51, 51, 51)" data-darkmode-bgimage-15860613985508="1" data-darkmode-bgcolor-15870356070738="rgb(36, 36, 36)" data-darkmode-original-bgcolor-15870356070738="rgb(255, 255, 255)" data-darkmode-color-15870356070738="rgb(51, 51, 51)" data-darkmode-original-color-15870356070738="rgb(51, 51, 51)" data-darkmode-bgimage-15870356070738="1" data-darkmode-bgcolor-15870356071023="rgb(36, 36, 36)" data-darkmode-original-bgcolor-15870356071023="rgb(255, 255, 255)" data-darkmode-color-15870356071023="rgb(51, 51, 51)" data-darkmode-original-color-15870356071023="rgb(51, 51, 51)" data-darkmode-bgimage-15870356071023="1" data-darkmode-bgcolor-15882384789136="rgb(36, 36, 36)" data-darkmode-original-bgcolor-15882384789136="rgb(255, 255, 255)" data-darkmode-color-15882384789136="rgb(51, 51, 51)" data-darkmode-original-color-15882384789136="rgb(51, 51, 51)" data-darkmode-bgimage-15882384789136="1" data-darkmode-bgcolor-15882396318564="rgb(36, 36, 36)" data-darkmode-original-bgcolor-15882396318564="rgb(255, 255, 255)" data-darkmode-color-15882396318564="rgb(51, 51, 51)" data-darkmode-original-color-15882396318564="rgb(51, 51, 51)" data-darkmode-bgimage-15882396318564="1" data-darkmode-bgcolor-15900529136199="rgb(36, 36, 36)" data-darkmode-original-bgcolor-15900529136199="rgb(255, 255, 255)" data-darkmode-color-15900529136199="rgb(51, 51, 51)" data-darkmode-original-color-15900529136199="rgb(51, 51, 51)" data-darkmode-bgimage-15900529136199="1" style="outline: 0px;max-width: 100%;font-size: 14px;color: rgb(51, 51, 51);text-align: left;box-sizing: border-box !important;overflow-wrap: break-word !important;"><span style="outline: 0px;max-width: 100%;font-family: 楷体, 楷体_GB2312, SimKai;white-space: pre-wrap;font-size: 12px;box-sizing: border-box !important;overflow-wrap: break-word !important;">点阅读原文,领AI全套资料!</span></section></section></section></section></section></section></section>

本篇文章来源于: 菜鸟学Python

本文为原创文章,版权归所有,欢迎分享本文,转载请保留出处!

知行编程网
知行编程网 关注:1    粉丝:1
这个人很懒,什么都没写

你可能也喜欢

热评文章

发表评论

表情 格式 链接 私密 签到
扫一扫二维码分享