支持将窗口作为组件引入

This commit is contained in:
2024-07-29 08:54:38 +08:00
parent 0623b95fca
commit 3bcff8dd87
3 changed files with 48 additions and 8 deletions

15
globalenv.py Normal file
View File

@@ -0,0 +1,15 @@
# -*- coding: utf-8 -*-
def _init():#初始化
global _global_dict
_global_dict = {}
def set_value(key,value):
""" 定义一个全局变量 """
_global_dict[key] = value
""" 获得一个全局变量,不存在则返回默认值 """
def get_value(key,defValue=None):
try:
return _global_dict[key]
except KeyError:
return defValue