Python 简单文件处理
2014-05-02 23:31
435 查看
仅仅是为了Linux操作方便= =命令行最近没有时间仔细看看,电脑一直都在机房,暂且这般记着吧= =
spath="D:/download/baa.txt" f=open(spath,"w") # Opens file for writing.Creates this file doesn't exist. f.write("First line 1.\n") f.writelines("First line 2.") f.close() f=open(spath,"r") # Opens file for reading for line in f: print line f.close() raw_input("press any key to continue...")
相关文章推荐
- Python 读写txt文件中文简单处理
- Python 简单文件处理
- Python 简单文件处理
- [原]Python 简单文件处理
- [原]Python 简单文件处理
- Python文件数据简单处理
- "Python"学习笔记----简单文件处理
- [PYTHON]简单的文件增删改查处理
- Python-使用CSV模块进行文件处理
- Python开发技术详解-笔记_第07章-文件的处理
- python脚本0b文件处理
- ubuntu下通过python处理word文件中的表格
- 一个简单的记事本-----熟悉JFrame、j组件、事件处理机制(监听机制)、BufferedReader/BufferedWriter 、文件选择器组件JFileChooser
- python处理大文件的内存问题
- 使用python处理文件
- python处理json格式的文件
- 王亟亟的Python学习之路(九)-sorted()排序以及简单字符串处理
- python-17-如何读取文本文件?如何处理二进制文件?如何设置文件的缓冲?
- Python文件处理
- python处理txt文件