亚洲在线久爱草,狠狠天天香蕉网,天天搞日日干久草,伊人亚洲日本欧美

為了賬號安全,請及時綁定郵箱和手機立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

關于from os.path import exists

關于from os.path import exists

miss510 2017-08-01 17:36:43
from sys import argv?from os.path import existsscrip,from_file,to_file=argv ? ? #怎么這行是錯的?print "Copying from %s to %s" % (from_file, to_file)# We ciuld do these two on ?one line too, how?in_file = open(from_file)indata = in_file.read()print "The input file is %d bytes long"% len(indata)print "Does the output file exist? %r" % exists(to_file)print "Ready, hit REURN to continue, CTRL-C to abort."raw_input()out_file = open(to_file,'w')out_file.write(indata)print "Alright, all done."out_file.close()in_file.close()
查看完整描述

1 回答

?
產品經理不是經理

TA貢獻481條經驗 獲得超143個贊

你在哪運行的?你運行的時候添加命令行參數沒

查看完整回答
1 反對 回復 2017-08-01
  • 1 回答
  • 0 關注
  • 3104 瀏覽
慕課專欄
更多

添加回答

舉報

0/150
提交
取消
微信客服

購課補貼
聯系客服咨詢優惠詳情

幫助反饋 APP下載

慕課網APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網微信公眾號