本文整理汇总了Python中configuration.Configuration.getInteractive方法的典型用法代码示例。如果您正苦于以下问题:Python Configuration.getInteractive方法的具体用法?Python Configuration.getInteractive怎么用?Python Configuration.getInteractive使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类configuration.Configuration
的用法示例。
在下文中一共展示了Configuration.getInteractive方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: clear
# 需要导入模块: from configuration import Configuration [as 别名]
# 或者: from configuration.Configuration import getInteractive [as 别名]
def clear():
"""
Clear the screen,
only if the configuration says it's OK.
"""
if Configuration.getClear() and Configuration.getInteractive():
sys.stdout.write(Configuration.clearcode)
示例2: wait
# 需要导入模块: from configuration import Configuration [as 别名]
# 或者: from configuration.Configuration import getInteractive [as 别名]
def wait():
"""
Prompt and wait for user to press enter,
only if the configuration says it's OK.
"""
if Configuration.getClear() and Configuration.getInteractive():
print
print "press enter",
raw_input()