code: def set_pythonshell_font(self, font=None):
          
          if font is None:
              font = QFont()
          for style in self.font_styles:
              style.apply_style(font=font,
                                is_default=style is self.default_style)
          self.ansi_handler.set_base_format(self.default_style.format)
docs: Python Shell only