[Python] VSCode indentation error on fresh install [closed]

Discussão em 'Python' iniciado por Stack, Outubro 1, 2024.

  1. Stack

    Stack Membro Participativo

    I'm attempting the following the code in a fresh install of VSCode but im getting an indentation error

    def setWindow():
    from FunctionsImages import imageFind
    from FunctionsMouseAndKey import cursorMove, clickMouse
    win = pygetwindow.getWindowsWithTitle(config.rlTitle)

    return

    >>> def setWindow():
    ... from FunctionsImages import imageFind
    ... from FunctionsMouseAndKey import cursorMove, clickMouse
    ... win = pygetwindow.getWindowsWithTitle(config.rlTitle)
    ...
    >>> return
    File "<stdin>", line 1
    return
    IndentationError: unexpected indent
    >>>


    I've just installed vs code on a new laptop and installed the python extension. i've got python interpreter open in the terminal too. This works on my other PC but not in this fresh install.

    Only change i've made post install was changing the key binding for - "Terminal:run selected text in active terminal" to shift + enter. I use this to run selected text.

    Continue reading...

Compartilhe esta Página