問題描述:
300個文件,通過python依次將每個文件內(nèi)容放入剪切板clipboard
js代碼:
import os
#from Tkinter import Tk
for i in range(228,325):
#with open(str(i)+".txt","r") as f:
# txt=f.read()
command="type "+str(i)+".txt | clip"
os.system(command)
#print(txt)
raw_input("go on?next is"+str(i+1))
注意事項
1.通過raw_input暫停復制
2.python2.7與3差別還得挺大,3中input合并了raw_input功能;system的command的功能也不太相同,在stackoverflow上看到的兩個都不能用
3.注釋的部分是3的內(nèi)容