def show_syspath(): """Show sys.path""" dlg = DictEditor(sys.path, title="sys.path", width=600, icon='syspath.png', readonly=True) dlg.exec_()
def dictedit(instance, item, value, parent): from spyderlib.widgets.dicteditor import DictEditor editor = DictEditor(parent) value_was_none = value is None if value_was_none: value = {} editor.setup(value) if editor.exec_(): return editor.get_value() else: if value_was_none: return return value