Python Forum
How can I draw en color shapes on python?
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How can I draw en color shapes on python?
#1
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..
Reply
#2
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)
Reply
#3
For really simple graphics, there is always the turtle package.
Craig "Ichabod" O'Brien - xenomind.com
I wish you happiness.
Recommended Tutorials: BBCode, functions, classes, text adventures
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Make Label Text background (default color) transparent using tkinter in python barry76 1 23,469 Nov-28-2019, 10:19 AM
Last Post: Larz60+
  Tkinter Generate/Delete Shapes with Keyboard Events baseball2201 3 3,475 Aug-16-2019, 12:23 PM
Last Post: Larz60+

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020