Python Forum

Full Version: How can I draw en color shapes on python?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
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..
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_Pro...rogramming
detailed reference manual here: http://infohost.nmt.edu/tcc/help/pubs/tk...index.html (can download pdf)
For really simple graphics, there is always the turtle package.