VSCode/Jupyter interfering with Rich (log formatting library for Python) and I see an </> for each output

Question:

Here is what I am seeing, the sign to the left of each output
How do I make that go away? Again I am using VSCode/Python and Jupyter Notebooks

The outputs or like log.info("some text")
From what I have read so far it seems to be because rich is using markup that is like HTML and then Jupyter renders this as HTLM or something

import logging
import os
import sys
from rich.logging import RichHandler
def set_logging():
    FORMAT = "Func/Mod:%(funcName)s  %(message)s"
    logging.basicConfig(level=logging.INFO, format=FORMAT, datefmt="[%X]", handlers=[RichHandler(markup=True, show_path=False)])
    if sys.platform.lower() == "win32": 
        os.system('color')
    log = logging.getLogger(__name__)
    #log = logging.getLogger("mylog")
    log.setLevel(logging.INFO)
    return log
if __name__=="__main__":
    log=set_logging()
    log.info("This is a test")
    log.info("This is a test")
    log.info("This is a test")

enter image description here

Asked By: MiniMe

||

Answers:

According to the answer on github.

Unfortunately, there is currently no way to remove <> on vscode-jupyter.

Because it is a button that appears on each output. It lets you change the renderer type for that output.

You can use jupyter notebook if you like. This symbol <> does not appear in my use of jupyter notebook.

enter image description here

Answered By: MingJie-MSFT