The minute you think of giving up, think of the reason why you held on so long!
发布时间:2013-02-04 11:51:53
python读取文件内容:1. 使用argv# coding:utf-8#!/usr/bin/python from sys import argv script, filename = argvtxt = open(filename, 'r') print "你要查看的文件是:%r" %filenameprint ""print "文件内容如下:"print txt.read()执行脚本:# python readfile_1.py /home/a.test2. 使用raw.........【阅读全文】