TURTLE
-
[Python/Turtle] 7. Help and configuration, Turtledemo코딩/Python 2022. 12. 20. 01:22
Help and configuration How to use help Screen 및 Turtle 클래스의 공개 메서드는 docstring을 통해 광범위하게 문서화. 따라서 Python 도움말 기능을 통해 온라인 도움말로 사용. IDLE을 사용하는 경우 툴팁에 함수/메서드 호출에 입력된 docstring의 서명과 첫 번째 줄이 표시. 메서드 또는 함수에서 help()를 호출하면 docstring이 표시. help(Screen.bgcolor) Help on method bgcolor in module turtle: bgcolor(self, *args) unbound turtle.Screen method Set or return backgroundcolor of the TurtleScreen. Argumen..
-
[Python/Turtle] 6. Public classes코딩/Python 2022. 12. 20. 01:20
빨리가기 RawTurtle / Turtle / TurtleScreen / Screen / ScrolledCanvas / Shape / addcomponent / Vec2D Public classes class turtle.RawTurtle(canvas) / class turtle.RawPen(canvas) canvas – a tkinter.Canvas, a ScrolledCanvas or a TurtleScreen 거북이를 만든다. 거북이는 위에서 "Turtle/RawTurtle의 메서드"로 설명한 모든 메서드를 가지고 있다. class turtle.Turtle RawTurtle의 하위 클래스는 동일한 인터페이스를 갖지만 처음 필요할 때 자동으로 생성된 기본 Screen 개체를 그린다. class tur..
-
[Python/Turtle] 5. Methods of TurtleScreen/Screen and corresponding functions코딩/Python 2022. 12. 20. 01:18
bgcolor / bgpic / clear / clearscreen / reset / resetscreen / screensize / setworldcoordinates / delay / tracer / update / listen / onkey / onkeypress / onclick / ontimer / mainloop / textinput / numinput / mode / colormode / getcanvas / getshapes / register_shape / turtles / window_height / window_width / bye / exitonclick / setup / title Methods of TurtleScreen/Screen and corresponding functio..
-
[Python/Turtle] 4. Methods/Color control, Filling코딩/Python 2022. 12. 19. 21:55
빨리가기 pencolor() / fillcolor() / color() / filling() / begin_fill() / end_fill() Methods of RawTurtle/Turtle Color control turtle.pencolor(*args) 펜 색상을 반환하거나 설정 입력 포맷 pencolor() 현재 펜 색상을 색상 지정 문자열 또는 튜플로 반환 다른 color/pencolor/fillcolor 호출에 대한 입력으로 사용 pencolor(colorstring) pencolor를 "red", "yellow" 또는 "#33cc8c"와 같은 Tk 색상 사양 문자열인 colorstring으로 설정 pencolor((r, g, b)) pencolor를 r, g, b의 튜플로 표현되는 RGB 색..
-
[Python/Turtle] 3. Methods/Turtle state & Settings for measurement코딩/Python 2022. 12. 19. 21:36
빨리가기 position() / towards() / xcor() / ycor() / heading() / distance() / degrees() / radians() Methods of RawTurtle/Turtle Turtle's state turtle.position() / turtle.pos() 거북이의 현재 위치를 (x,y) (Vec2D vector)로 반환. turtle.pos() (440.00,-0.00)turtle.towards(x, y=None) x – a number or a pair/vector of numbers or a turtle instance y – a number if x is a number, else None 거북이 위치에서 (x,y)로 지정된 위치까지의 선, ..
-
[Python/Turtle] 2. Methods/Turtle motion, Pen control, More drawing control, Using events, Compound shapes코딩/Python 2022. 12. 19. 21:36
forward / back / right / left / goto;setpos;setposition / setx / sety / setheading;seth / home / circle / dot / stamp / clearstamp / clearstamps / undo / speed / pendown;pd;down / penup;pu;up / pensize / pen / isdown / reset / clear / write / onclick / onrelease / ondrag / begin_poly / end_poly / get_poly / clone / getturtle;getpen / getscreen / setundobuffer / undobufferentries / Compound shape..