>>> t= subprocess.Popen(['curl', '-T', '/home/test/Downloads/1.xml', 'http://far-away-server/'], stdout = subprocess.PIPE, stderr = subprocess.PIPE)
>>> out,err = t.communicate()
>>> print out
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