Python 简单文件处理
2014-10-17 00:00
148 查看
仅仅是为了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 简单文件处理
- Python 简单文件处理
- Python文件数据简单处理
- Python 读写txt文件中文简单处理
- "Python"学习笔记----简单文件处理
- Python 简单文件处理
- [PYTHON]简单的文件增删改查处理
- [原]Python 简单文件处理
- 使用python 3.0 处理utf8格式的文件BOM问题
- Matlab中如何读出写入图像文件以及对图像的简单处理
- Python recipe(9): 文件的逐词处理
- python笔记(十) - 异常和文件处理
- Python来完成简单图像处理任务
- Python中关于文件路径的简单操作 [转]
- Python学习笔记---模块;文件与文本处理
- python文件处理
- Python模块之递归处理文件和文件夹
- Python 文件(file)处理 例子
- python字符串处理简单优化
- python中关于文件路径的简单操作[zz]