学习享受开始:
打开IDLE(Python GUI) ,Ctrl+n 打开新的文件,输入
#NiceHexSpiral.py ? import turtle colors=[‘red‘,‘purple‘,‘blue‘,‘green‘,‘yellow‘,‘orange‘] t = turtle.Pen() turtle.bgcolor(‘black‘) for x in range(360): t.pencolor(colors[x%6]) t.width(x/100+1) t.forward(x) t.left(59)
Ctrl+s 保存为NiceHexSpiral.py,F5运行
Web 浏览器访问 http://idlex.sourceforge.net/extensions.html
解压
可以直接双击,进入
ctrl+n 打开新的文件,带有行号
拷贝该位置的LineNumbers.py
到安装Python 3.2 的目录 E:\ProgramFiles\Python32\Lib\idlelib 下
在同目录的该文件
结尾添加
[LineNumbers]
enable=1
enable_editor=1
enable_shell=0
visible=True
保存该文件,重新打开IDLE即可显示行号
原文:https://www.cnblogs.com/d1012181765/p/15218101.html