本文整理汇总了Python中status.Status.cleanUp方法的典型用法代码示例。如果您正苦于以下问题:Python Status.cleanUp方法的具体用法?Python Status.cleanUp怎么用?Python Status.cleanUp使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类status.Status
的用法示例。
在下文中一共展示了Status.cleanUp方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: App
# 需要导入模块: from status import Status [as 别名]
# 或者: from status.Status import cleanUp [as 别名]
#.........这里部分代码省略.........
if len(pl) > 0:
l = ListBoxChoice(
clist=pl.keys(), master=self, title="Choose Slic3r Profile", message="Choose Slic3r profile"
)
pn = l.returnValue()
if pn:
self.slic3r.setProfile(pn)
self.setS3ProfileMenuText()
self.toolbar.setSliceText()
else:
self.logger.logMsg("Unable to retrieve available slic3r profiles")
def chooseSFProfile(self):
pl = self.skeinforge.getProfileOptions()
if len(pl) > 0:
l = ListBoxChoice(
clist=pl.keys(), master=self, title="Choose Skeinforge Profile", message="Choose Skeinforge profile"
)
pn = l.returnValue()
if pn:
self.skeinforge.setProfile(pn)
self.setSFProfileMenuText()
self.toolbar.setSliceText()
else:
self.logger.logMsg("Unable to retrieve available skeinforge profiles")
def setS3ProfileMenuText(self):
self.slicermenu.entryconfig(self.S3profileindex, label="Choose Profile (%s)" % self.slic3r.getProfile())
def setSFProfileMenuText(self):
self.slicermenu.entryconfig(self.SFprofileindex, label="Choose Profile (%s)" % self.skeinforge.getProfile())
def quitApp(self):
self.cleanUp()
self.master.quit()
def cleanUp(self):
if self.connected:
self.printer.disconnect()
if self.slicing:
self.slicerCancel = True
self.httpServer.close()
self.statline.cleanUp()
self.settings.cleanUp()
def doEditMacro(self):
idir = os.path.join(self.settings.cmdFolder, "macros")
try:
l = os.listdir(idir)
except:
self.logger.logMsg("Unable to get listing from macros directory: " + idir)
return
r = []
for f in sorted(l):
if f.endswith(".macro"):
r.append(f)
l = ListBoxChoice(master=self, title="Macro Files", message="Choose a macro to edit", clist=r)
fn = l.returnValue()
if fn:
try:
fn = os.path.join(idir, fn)
with open(fn) as f:
text = f.read()
self.macroEdit = MacroEdit(self, self.printer, self.settings, self.logger, fn, text)
except: