mercredi 25 mars 2015

Formatting a command in python

I was able to run this command through the command line but when I transfer it over to a Python script and run it, it doesn't work.



test = 'aws ec2 create-image --instance-id i-563b6379 --name "rwong_TestInstance" --output text --description "rwong_TestInstance" --no-reboot > "V:\rwong\Work Files\Python\test.txt"'
subprocess.call(test)


I get an error where it says "returned non-zero exit status 255". Is it because of the way I formatted the string? Overall, what are my options to get this to work?





Aucun commentaire:

Enregistrer un commentaire