def create_user_panel(self): """Создаем пользовательскую вкладку.""" self.panels.append(RB_Panel( to_str(os.path.join(self.path)), self, True) )
def set_row_val(self, w, h, val, pref="-", rounded=None): if val: if rounded is not None: if rounded < 1: val = int(val) else: val = round(val, rounded) else: val = val else: val = pref self.head.SetCellText(h, w, to_str(val))
def script_path(self): """Получаем путь к скрипуту __init__.py.""" script_path = None if not self.is_user: files = os.listdir(self.path) for i in files: if os.path.isfile(os.path.join(self.path, i)): line = to_str(i) if line == '__init__.py': script_path = os.path.join(self.path, i) else: script_path = self.path return script_path
def set_row_list(self, r, arr): for i in range(0, len(arr)): self.head.SetCellText(r, i, to_str(arr[i]))
def set_row_val(self, w, h, val): self.head.SetCellText(h, w, to_str(val))