Open mofoster opened 7 years ago
Make sure you are running the script using Python 2 instead of Python 3 - the syntax for i.e. print statements is different depending on the version, I get exactly the same issue on my Mac;
macbook:list-ec2 marekku$ python3 list-ec2.py
File "list-ec2.py", line 105
print y[:-2].strip()
^
SyntaxError: invalid syntax
Once you try running with python 2.7 (which is usually just called 'python' on Mac/Linux), it should work well. You can check the version of Python installed by running 'python -v' on the command line.
Let me know if this solves the issue for you.
Thanks for your prompt response, yes this does works under my ubuntu box. btw does the name tag still working for you? Mine has been showing blanks
I've just pushed an update that should print all the EC2 tags you defined for an instance. Let me know if it works now.
Hi, it's a great script, 100% fit my needs, however I am getting the following error when I try to run under window...
C:\python\list-ec2-master>python list-ec2.py File "list-ec2.py", line 105 print y[:-2].strip() ^ SyntaxError: invalid syntax
Thanks ;)