1
我嘗試從本地計算機發送文件到服務器。subprocess.Popen中的錯誤在哪裏?
t= subprocess.Popen(['curl', '-T', '/home/test/Downloads/my_own.xml',
'http://far_away_server/'], stdout = subprocess.PIPE, stderr = subprocess.PIPE)
在標準錯誤我看到:
usage: curl [file] [URL]
[file] [HTTP] fetches a file from an 'http' URL
[file] [HTTPS] fetches a file from an 'https' URL
[file] [FTP] fetches a file from a 'ftp' URL
哪裏是我的錯?
請提供準確運行 – Dmitry
@DmitryFrolov的命令,我在bash中寫道: '>>>導入子 >>> T = subprocess.Popen(['捲曲','-T','/home/test/Downloads/my_own.xml', 'http:// far_away_server /'],stdout = subprocess.PIPE,stderr = subprocess.PIPE) >>> out,err = t.communicate() >>> print err' – flow
我有一個錯誤curl:'(6)無法解析主機:far_away_server',請給出'curl --version'結果。 – Dmitry