tkinter介绍
tkinter是python自带的GUI库,是对图形库TK的封装
tkinter是一个跨平台的GUI库,开发的程序可以在win,linux或者mac下运行
# !/user/bin/env Python3
# -*- coding:utf-8 -*-
"""
file:window.py.py
create time:2019/6/27 14:54
author:Loong Xu
desc: 窗口
"""
import tkinter as tk
from tkinter import filedialog, dialog
import os
window = tk.Tk()
window.title('窗口标题') # 标题
window.geometry('500x500') # 窗口尺寸
file_path = ''
file_text = ''
text1 = tk.Text(window, width=50, height=10, bg='orange', font=('Arial', 12))
text1.pack()
def open_file():
'''
打开文件
:return:
'''
global file_path
global file_text
f