Python Forum
How can I draw en color shapes on python? - Printable Version

+- Python Forum (https://python-forum.io)
+-- Forum: Python Coding (https://python-forum.io/forum-7.html)
+--- Forum: GUI (https://python-forum.io/forum-10.html)
+--- Thread: How can I draw en color shapes on python? (/thread-5535.html)



How can I draw en color shapes on python? - MBlastSt - Oct-09-2017

How do i draw shapes in python?

For a project i have to ask the users some questions about time and depending on the answer I have to print a hourglass (two triangles) that more or less matches that time. Now i have no problem with the code or so but i just don't know how to print those shapes and fill them with a colour..


RE: How can I draw en color shapes on python? - Larz60+ - Oct-09-2017

There are quite a few graphics packages for python.
tkinter is built in to most recent versions of python.
In tkinter there is the canvas widget which allows standard drawing tools.
get the basics here: https://en.wikibooks.org/wiki/Python_Programming/GUI_Programming
detailed reference manual here: http://infohost.nmt.edu/tcc/help/pubs/tkinter/web/index.html (can download pdf)


RE: How can I draw en color shapes on python? - ichabod801 - Oct-09-2017

For really simple graphics, there is always the turtle package.