Community

    • Login
    • Search
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search

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

    Help wanted · · · – – – · · ·
    notepad python
    2
    5
    1482
    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 Deane
      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 Frank 2 Replies Last reply Reply Quote 0
      • Claudia Frank
        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 Deane 1 Reply Last reply Reply Quote 0
        • Michael Deane
          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 Frank
            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 Deane 1 Reply Last reply Reply Quote 0
            • Michael Deane
              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
              Copyright © 2014 NodeBB Forums | Contributors