subprocess.Popen中的错误在哪里?

时间:2017-01-30 15:06:27

标签: python url curl subprocess popen

我尝试将文件从本地计算机发送到服务器。

t= subprocess.Popen(['curl', '-T', '/home/test/Downloads/my_own.xml', 
   'http://far_away_server/'], stdout = subprocess.PIPE, stderr = subprocess.PIPE)
在stderr中我看到了:

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

我的错误在哪里?

1 个答案:

答案 0 :(得分:0)

  1. 检查你只有一个卷曲) 当然,写/ usr / bin / curl
  2. 检查conf.file URL(远远服务器)必须在那里。
  3. 检查终端中的curl-command,其中所有名称都已满。
  4. 必须工作......

相关问题