Set or return the line thickness. Aliases: pensize | width Argument: width -- positive number Set the line thickness to width or return it. If resizemode is set to "auto" and turtleshape is a polygon, that polygon is drawn with the same li
(self, width=None)
| 2071 | self.pen(resizemode=rmode) |
| 2072 | |
| 2073 | def pensize(self, width=None): |
| 2074 | """Set or return the line thickness. |
| 2075 | |
| 2076 | Aliases: pensize | width |
| 2077 | |
| 2078 | Argument: |
| 2079 | width -- positive number |
| 2080 | |
| 2081 | Set the line thickness to width or return it. If resizemode is set |
| 2082 | to "auto" and turtleshape is a polygon, that polygon is drawn with |
| 2083 | the same line thickness. If no argument is given, current pensize |
| 2084 | is returned. |
| 2085 | |
| 2086 | Example (for a Turtle instance named turtle): |
| 2087 | >>> turtle.pensize() |
| 2088 | 1 |
| 2089 | >>> turtle.pensize(10) # from here on lines of width 10 are drawn |
| 2090 | """ |
| 2091 | if width is None: |
| 2092 | return self._pensize |
| 2093 | self.pen(pensize=width) |
| 2094 | |
| 2095 | |
| 2096 | def penup(self): |