def _init():#初始化
    global _globalDict
    _globalDict = {}
    _globalDict['_touchMode'] = 0 # 触控模式
    _globalDict['MainWindow'] = None
    _globalDict['blockManage'] = None
def setValue(key,value):
    """ 定义一个全局变量 """
    _globalDict[key] = value

def getValue(key,defValue=None):
    """ 获得一个全局变量,不存在则返回默认值 """
    try:
        return _globalDict[key]
    except KeyError:
        print('没有这个变量')
        return False
def clearValue(key):
    _globalDict[key].clear()