本文整理汇总了Python中Core.Dialogs.sleep方法的典型用法代码示例。如果您正苦于以下问题:Python Dialogs.sleep方法的具体用法?Python Dialogs.sleep怎么用?Python Dialogs.sleep使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Core.Dialogs
的用法示例。
在下文中一共展示了Dialogs.sleep方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: stopReadOnlyEmbeddedDB
# 需要导入模块: from Core import Dialogs [as 别名]
# 或者: from Core.Dialogs import sleep [as 别名]
def stopReadOnlyEmbeddedDB(_isNoAlertIfSuccessfully=True):
global isReadOnlyStarted
if isReadOnlyStarted is False:
return True
isReadOnlyStarted = False
mysqldPID = getReadOnlyPID()
if mysqldPID is not None:
Execute.execute(["kill", "-TERM", str(mysqldPID)])
Dialogs.sleep(translate("EmbeddedDBCore", "Stopping Embedded Server..."), 3)
if _isNoAlertIfSuccessfully is False:
Dialogs.show(translate("EmbeddedDBCore", "Stopped Embedded Server"),
translate("EmbeddedDBCore", "Embedded Amarok database server stopped."))
return True
示例2: startReadOnlyEmbeddedDB
# 需要导入模块: from Core import Dialogs [as 别名]
# 或者: from Core.Dialogs import sleep [as 别名]
def startReadOnlyEmbeddedDB(_isNoAlertIfSuccessfully=True):
global isReadOnlyStarted
if isReadOnlyStarted:
return True
if uni.checkMysqldSafe():
Execute.executeWithThread(
[uni.MySettings["pathOfMysqldSafe"], "--defaults-file=" + fu.pathOfSettingsDirectory + "/Amarok/my.cnf"])
Dialogs.sleep(translate("EmbeddedDBCore", "Starting Embedded Server..."), 3)
if _isNoAlertIfSuccessfully is False:
Dialogs.show(translate("EmbeddedDBCore", "Started Embedded Server"),
translate("EmbeddedDBCore", "Embedded Amarok database server started."))
isReadOnlyStarted = True
return True
isReadOnlyStarted = False
return False
示例3: startEmbeddedDB
# 需要导入模块: from Core import Dialogs [as 别名]
# 或者: from Core.Dialogs import sleep [as 别名]
def startEmbeddedDB(_isNoAlertIfSuccessfully=True):
global isStarted
if isStarted:
return True
if uni.checkMysqldSafe():
Execute.executeWithThread([uni.MySettings["pathOfMysqldSafe"],
"--defaults-file=" + uni.getKDE4HomePath() + "/share/apps/amarok/mysqle/my.cnf"])
Dialogs.sleep(translate("EmbeddedDBCore", "Starting Embedded Server..."), 3)
if _isNoAlertIfSuccessfully is False:
Dialogs.show(translate("EmbeddedDBCore", "Started Embedded Server"),
translate("EmbeddedDBCore", "Embedded Amarok database server started."))
isStarted = True
return True
isStarted = False
return False