DearPyGui_Ext icon indicating copy to clipboard operation
DearPyGui_Ext copied to clipboard

Logger documentation example

Open DataExplorerUser opened this issue 4 years ago • 0 comments

The dearpygui-ext documentation still needs some love. It's here, but it's empty. https://dearpygui-ext.readthedocs.io/en/latest/index.html

Cothren's example should be added.

import dearpygui.dearpygui as dpg
import dearpygui.demo as demo
from dearpygui_ext.logger import mvLogger

dpg.create_context()
dpg.create_viewport()

log = mvLogger()
log.log("log")
log.log_debug("log debug")
log.log_info("log info")
log.log_warning("log warning")
log.log_error("log error")
log.log_critical("log critical")

demo.show_demo()

with dpg.window(label="tutorial", width=500, height=500, show=False):
    dpg.add_button(label="Press me", callback=lambda:dpg.toggle_viewport_fullscreen())

# main loop
dpg.show_viewport()
dpg.setup_dearpygui()
dpg.start_dearpygui()
dpg.destroy_context()

DataExplorerUser avatar Oct 25 '21 18:10 DataExplorerUser