hoffstadt / DearPyGui

Dear PyGui: A fast and powerful Graphical User Interface Toolkit for Python with minimal dependencies
https://dearpygui.readthedocs.io/en/latest/
MIT License
12.62k stars 669 forks source link

chore: add `__name__` block to `demo.py` #2348

Open tusharsadhwani opened 2 weeks ago

tusharsadhwani commented 2 weeks ago

Description:

The demo.py file is currently part of the dearpygui package, but there's no way to execute it from the installed package itself.

By adding an if __name__ == '__main__' block, that makes the demo file directly executable from the package, by doing:

python -m dearpygui.demo

Which is probably the best way to run the package demo. I'd also recommend mentioning it as so in the README.