本文整理汇总了Python中note.Note.append_defaults方法的典型用法代码示例。如果您正苦于以下问题:Python Note.append_defaults方法的具体用法?Python Note.append_defaults怎么用?Python Note.append_defaults使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类note.Note
的用法示例。
在下文中一共展示了Note.append_defaults方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: Main
# 需要导入模块: from note import Note [as 别名]
# 或者: from note.Note import append_defaults [as 别名]
#.........这里部分代码省略.........
email."))
# Validar descipción
if is_empty_string(self.dnota):
messages.append(_("- Take a moment and describe the failure."))
# Validar opciones seleccionadas
if not self.__build_note():
messages.append(_("- Select at least 1 option box \
Data to Send."))
# Validaciones sólo para el caso de enviar
if not self.__is_viewonly():
# Chequear internet
if not have_internet_access():
messages.append(_("- It has an active internet connection. \
Select the Do not Send."))
return messages
def __is_viewonly(self):
return self.check_gdocum.get_active()
def __build_note(self):
selection = False
self.note = Note(self.txt_titulo.get_text(),
self.txt_autor.get_text(),
self.txt_correo.get_text(),
self.dnota)
self.note.is_viewonly = self.__is_viewonly()
self.note.append_defaults()
#TODO: Ordenar estos comandos desde lo mas general a lo mas especifico
if self.check_lspci.get_active() == True:
command = "lspci -nn"
subtitle = _("Devices connected by PCI")
self.note.add_log_output(command, subtitle)
selection = True
if self.check_tm.get_active() == True:
command = "lspci | grep 'Host bridge:'"
subtitle = _("Motherboard")
self.note.add_log_output(command, subtitle)
selection = True
if self.check_lsusb.get_active() == True:
command = "lsusb"
subtitle = _("Devices connected by USB port")
self.note.add_log_output(command, subtitle)
selection = True
if self.check_acelgraf.get_active() == True:
command = "glxinfo | grep -A4 'name of display:'"
subtitle = _("Graphics Acceleration")
self.note.add_log_output(command, subtitle)
selection = True
if self.check_ired.get_active() == True:
command = "cat /etc/network/interfaces"
subtitle = _("Information Network interfaces")
self.note.add_log_output(command, subtitle)
selection = True