Running Curl command in python

Viewed 13023

I'm running the following curl command in CGI script in python using os.system call as below:

os.system('curl -u username:password -X PUT example.com/data/data1.txt -T /diskless/desktop/file.txt\r\n')

Getting the below error when I run the CGI script:

'!rl: Can't open '/diskless/desktop/file.txt') curl: try 'curl --help' or 'curl --manual' for more information.

Any suggestions please?

1 Answers
Related