Entry
A graphics.py box where the user can type text, read with getText() and set with setText().
In more detail
Only strings go in and out: getText returns a string, so convert with int or float before doing arithmetic, and pass a string to setText. The program usually waits for a mouse click as the signal that typing is finished.
Related terms
- graphics object — A shape in graphics.py, such as a Point, Line, Circle, Rectangle, Oval, Polygon or Text, which you construct and then draw in a window.
- type conversion — Turning a value of one type into another, such as the string "23" into the integer 23.
- getMouse() — The GraphWin method that waits until the user clicks in the window and returns the click position as a Point.
Taught in
- Installing Python On Windows — Hands-on Python: Complete Video Course & Book
- Where Python Lives: PATH And Versions — Hands-on Python: Complete Video Course & Book
- First Run, And Fixing A Broken Install — Hands-on Python: Complete Video Course & Book
- Dictionaries — Hands-on Python: Complete Video Course & Book
- Reading The graphics.py Documentation — Hands-on Python: Complete Video Course & Book
- Entry Objects — Hands-on Python: Complete Video Course & Book