Community
    • Login

    Notepad doesn't recognize my syntax as python. Please help

    Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
    notepadpython
    5 Posts 2 Posters 1.9k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • Michael DeaneM
      Michael Deane
      last edited by

      My notepad stopped recognising the code i type in, so when i run it in python/powershell the whole file is printed word for word instead of executing my commands. Please assist. Thanks.

      Claudia FrankC 2 Replies Last reply Reply Quote 0
      • Claudia FrankC
        Claudia Frank @Michael Deane
        last edited by

        @Michael-Deane

        Python and Powershell interpreter are responsible for execution your scripts, not npp.
        Npp can run the interpreters and provide the current document as the parameter.
        How did you run it previously?

        Cheers
        Claudia

        Michael DeaneM 1 Reply Last reply Reply Quote 0
        • Michael DeaneM
          Michael Deane @Claudia Frank
          last edited by

          @Claudia-Frank ok. im new to python and notepad. how should i run “it”?

          1 Reply Last reply Reply Quote 0
          • Claudia FrankC
            Claudia Frank @Michael Deane
            last edited by

            @Michael-Deane

            several ways, either user run menu and function run, in the diaolg put something like

            cmd /K python $(FULL_CURRENT_PATH)
            

            $(FULL_CURRENT_PATH) will be automatically replaced by npp with the full path of
            the current active document, which of course must be a saved file

            or install NppExec plugin which does basically the same but offers a lot more extras
            (worth to give it a try)

            or install python script plugin and use the python function exec and execfile.
            The main purpose of this plugin is to interact with npp and scintilla but, could be used as well.
            Restriction: is still python 2

            Cheers
            Claudia

            Michael DeaneM 1 Reply Last reply Reply Quote 0
            • Michael DeaneM
              Michael Deane @Claudia Frank
              last edited by

              @Claudia-Frank Thank you. Danke. Gracias. I’ll let you know how it works out.

              MD

              1 Reply Last reply Reply Quote 1
              • First post
                Last post
              The Community of users of the Notepad++ text editor.
              Powered by NodeBB | Contributors