Python语言中文件操作实例(1)--Python(20)
来源:互联网 发布:蓝色星球软件 编辑:程序博客网 时间:2024/06/09 04:25
#the window setimport turtleturtle.title('数据驱动的动态路径绘制')turtle.setup(1200,600,0,0)#设置画笔pen = turtle.Turtle()pen.color("red")pen.width(5)pen.shape("turtle")pen.speed(5)#read the file to the list resultresult=[]file=open("data.txt","r")for line in file: result.append(list(map(float,line.split(','))))print (result)#根据每一条数据记录进行绘制for i in range(len(result)): pen.color((result[i][3],result[i][4],result[i][5])) pen.fd(result[i][0]) if result[i][1]: pen.rt(result[i][2]) else: pen.lt(result[i][2])
阅读全文
0 0
- Python语言中文件操作实例(1)--Python(20)
- Python中文件操作
- python中文件操作技巧
- python中文件的操作
- python中文件基本操作
- python中文件基本操作
- [Python ] python中文件的基本操作
- python中文件和目录操作
- python中文件和目录操作
- python中文件读取操作详解
- python中文件以及文件夹操作
- python中文件对象的操作小结
- python中文件读取操作及注意事项
- python中文件操作基本流程
- python中文件的基本操作
- Python语言中文件的基本处理--Python(19)
- Python 和 bash shell脚本(python和shell, python中文件操作, python中目录操作)
- python中文件压缩
- 解决Android Studio项目导入时,出现的gradle报错问题。
- C.3 小明买玫瑰
- 脚本:disown,&和nohup的区别
- 2017年书单
- apache配置文件AddType application/x-httpd-php .php
- Python语言中文件操作实例(1)--Python(20)
- Kubernetes存储之Persistent Volumes简介
- 第36课:kaishi 彻底解密Spark 2.1.X中Sort Shuffle中Reducer端源码内幕
- C.4 玩数字
- JS练习-360°全景图片
- C.5 坐标转换
- java笔试中字符串翻转的几种方法(java---华为----字符逆序)
- 《UNIX环境高级编程》第10章 信号
- lintcode刷题(Python)(3)