1

I've never used python before, but I have to in order to enable push notifications on my android app. When I type

python D:\Project\UAirship\clientauth.py

I get a syntax error with an error pointing to the drive letter. I've read support articles on urban airships website, and this is the way they execute this script so I'm not sure what I'm doing wrong. Thanks for your help.

davis
  • 1,911
  • 6
  • 26
  • 50

2 Answers2

1

You're supposed to type that in your shell/command interpreter, not the Python REPL.

Ignacio Vazquez-Abrams
  • 776,304
  • 153
  • 1,341
  • 1,358
0
  1. Check to make sure you've added Python to your path. At the C:> prompt type

    python

    and see what happens. If you get the Python shell, great. Else do what the faq says.

  2. edit: just fired up a windows box to check, and the D: shouldn't be a problem, never mind the thought that was previously occupying this space.

  3. It seems likely that ignacio is right in his answer: you're typing a command-prompt command into the python shell. Your cursor should be flashing after something that looks like this

    C:\>

    if it looks like this

    >>>

    type exit() to get out of the python shell and try again.

ben author
  • 2,855
  • 2
  • 25
  • 43
  • I do see >>>, but when I type exit() or ctrl+z and enter as the documentation said the window closes so I'm not sure how I'm supposed to get to the interpreter. – davis Mar 17 '12 at 01:11