Joseph
Joseph

Reputation: 21

Invalid Syntax With Python Script !/usr/bin/env python

I'm pretty new to Python and need some help. I was trying to do this with a Raspberry Pi: http://www.muacksandglomps.com/blog/2014/04/29/pebblypi-smart-doorbell/ and I keep on getting an error when I try to compile the code. The ! in the beginning of the code is highlighted with a invalid syntax error showing. I entered my API codes in the code if this matters. Help would be appreciated! Thanks!

Upvotes: 0

Views: 3808

Answers (2)

user3917838
user3917838

Reputation:

U need #!/usr/bin/env python, not !/usr/bin/env python.

Upvotes: 1

Josh Rumbut
Josh Rumbut

Reputation: 2710

I believe what you should be using is #!/usr/bin/env python

The #! is called a "shebang" and tells the shell which program to use to run the script.

Upvotes: 0

Related Questions