• Login
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.
  • M
    Michael Deane
    last edited by Jan 26, 2018, 3:05 AM

    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.

    C 2 Replies Last reply Jan 26, 2018, 5:50 PM Reply Quote 0
    • C
      Claudia Frank @Michael Deane
      last edited by Jan 26, 2018, 5:50 PM

      @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

      M 1 Reply Last reply Jan 27, 2018, 3:52 AM Reply Quote 0
      • M
        Michael Deane @Claudia Frank
        last edited by Jan 27, 2018, 3:52 AM

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

        1 Reply Last reply Reply Quote 0
        • C
          Claudia Frank @Michael Deane
          last edited by Jan 27, 2018, 12:37 PM

          @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

          M 1 Reply Last reply Jan 28, 2018, 2:37 AM Reply Quote 0
          • M
            Michael Deane @Claudia Frank
            last edited by Jan 28, 2018, 2:37 AM

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

            MD

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