I’m trying to write a Python script using the cattle cli. I’m using Python 3.5.2, using pip to install the cattle module. My simple python script is:
import cattle
client = cattle.client(url=‘http://my_url/v1’, access_key=‘my_key’, secret_key=‘my_secret’)
The error I get when I execute it is:
Traceback (most recent call last):
File “/scripts/cattle-monitor.py”, line 1, in
import cattle
File “/usr/local/lib/python3.5/site-packages/cattle.py”, line 3, in
import gdapi
File “/usr/local/lib/python3.5/site-packages/gdapi.py”, line 48
print fn.name, repr(ret)
^
SyntaxError: invalid syntax
Any tips as to what I’m doing wrong?