错误在哪里子进程。Popen?

2024-04-26 21:02:57 发布

您现在位置:Python中文网/ 问答频道 /正文

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

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

我的错在哪里?你知道吗


Tags: 文件from服务器anhttpurlhome计算机
1条回答
网友
1楼 · 发布于 2024-04-26 21:02:57
  1. 检查你只有一个卷发) 当然,写/usr/bin/curl
  2. 检查conf.file文件 URL(远端服务器)必须在那里。你知道吗
  3. 检查terminal中的curl命令,其中所有名称都是完整的。你知道吗

必须工作。。。你知道吗

相关问题 更多 >