本文整理汇总了Python中OpenIPMI.shutdown_everything方法的典型用法代码示例。如果您正苦于以下问题:Python OpenIPMI.shutdown_everything方法的具体用法?Python OpenIPMI.shutdown_everything怎么用?Python OpenIPMI.shutdown_everything使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类OpenIPMI
的用法示例。
在下文中一共展示了OpenIPMI.shutdown_everything方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: quit
# 需要导入模块: import OpenIPMI [as 别名]
# 或者: from OpenIPMI import shutdown_everything [as 别名]
def quit(self):
del self.mc
OpenIPMI.set_log_handler(DummyLogHandler())
OpenIPMI.shutdown_everything()
print "done"
sys.exit(0)
return
示例2: quit
# 需要导入模块: import OpenIPMI [as 别名]
# 或者: from OpenIPMI import shutdown_everything [as 别名]
def quit(self):
global shutdown_thread
shutdown_thread = True;
gui_cmdwin._HistorySave(self.histfile)
OpenIPMI.set_log_handler(DummyLogHandler())
OpenIPMI.shutdown_everything()
if (self.debug_mem):
print "OpenIPMI is shutdown, memory problems (SEGVs) after this"
print " are likely due to OpenIPMI data not being freed until"
print " after this point due to the python garbage collector"
pass
sys.exit()
return
示例3: Handlers
# 需要导入模块: import OpenIPMI [as 别名]
# 或者: from OpenIPMI import shutdown_everything [as 别名]
OpenIPMI.enable_debug_malloc()
OpenIPMI.init_posix()
main_handler = Handlers("hello")
OpenIPMI.set_log_handler(main_handler)
a = OpenIPMI.open_domain2("test", sys.argv[1:], main_handler, main_handler)
if not a:
print "open failed"
sys.exit(1)
pass
del a
while main_handler.name != "done":
OpenIPMI.wait_io(1000)
pass
class DummyLogHandler:
def __init__(self):
pass
def log(self, level, log):
sys.stderr.write(level + ": " + log + "\n")
OpenIPMI.set_log_handler(DummyLogHandler())
OpenIPMI.shutdown_everything()
print "done"
sys.exit(0)