Attempting to Open "" Program in CMD, IDLE Using File Path ie: C:\Users\Desktop\ Throws Syntax Error

Good day

When I try to open a program written in a text document and saved as a .py file in any command line interface it throws a syntax error " unexpected character after line continuation character"

I’m not sure what i’m missing…

Hello, @grant-knoetze, and welcome to the forums.

Are you trying to run or edit the program? What exactly are you typing into the terminal?

1 Like

Hi and thanks for the welcome…

I’m trying to run it…see snip below… :point_down:

Thanks again…

1 Like

Exit python. Navigate to the location of the file, or include the path in a command like so:

C:\Users\username> python
^^^^^^^^^^^^^^^^^^ ^^^^^^ ^^^^^^^^^^^^^^^^^
  command prompt     |        filename
            command to open python
1 Like

Aha! Good copy, and much thanks to you…