系统:mac os x 10.9 eclipse 在eclipse 中建立一个project, 命名为Cin_txt, Cin_txt的内容 test wang hello world 以下是输入的代码 import java.io.File; import java.io.FileInputStream; import java.io.IOException; public class Cin_txt { public static void main(String[] args) { Fil
创建文件(makeTextFile.py)脚本提醒用户输入一个尚不存在的文件名,然后由用户输入文件每一行,最后将所有文本写入文本文件 #!/usr/bin/env python 'makeTextFile.py -- creat text file' import os ls = os.linesep # get file name while True: if os.path.exists(fname): #不存在返False,存在返True print "ERROR: '%s' alread