adafruit / Adafruit_IO_Python

Adafruit IO Python Client Library
Other
225 stars 99 forks source link

print commands missing parentheses? #15

Closed neonpolaris closed 7 years ago

neonpolaris commented 8 years ago

I've setup the library on my Raspberry Pi running Arch Linux and Python 3.5.1. When I ran the examples (like mqtt_subscribe.py), I got an error when it came to the first print line: print 'Connected to Adafruit IO! Listening for {0} changes...'.format(FEED_ID) it ran fine after changing it like so (for each print in the whole file): print('Connected to Adafruit IO! Listening for {0} changes...'.format(FEED_ID))

The print lines mentioned in the readme file include the parentheses. Python is not my language so maybe I'm missing something obvious?

numericOverflow commented 7 years ago

What version of python are you using? Python 3.x syntax doesn't allow print without the parentheses, whereas it was/is OK for a naked print statement like that in Python 2.7x

http://stackoverflow.com/questions/32122868/python-3-print-without-parenthesis