0

I'm having this exact beginner problem. syntax error when using command line in python

As suggested I try to quit the interpreter. But when I try to quit the interpreter/shell with exit() or ctrl d the whole Python2.7.6 Shell and c:/python27/python.exe gets closed unlike in the Pyquick video tutorial I'm watching.

Community
  • 1
  • 1
adiga
  • 34,372
  • 9
  • 61
  • 83

1 Answers1

3

You need to run your Python files from a Windows command line prompt (Start > Run > "cmd").

Note that in said command line prompt, you can open an interactive Python session by typing "python" and hitting return.

Also, for all of that to work, you'll have to make sure Python is in your $PATH (Control Panel > System and Security > System, click "Advanced System Settings", "Environment Variables", find "Path" in the list and add C:\Python27\ to the list of paths).

Max Noel
  • 8,810
  • 1
  • 27
  • 35