Community
    • Login

    PythonScript: "New Script" not shown

    Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
    15 Posts 4 Posters 445 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.
    • Alan KilbornA
      Alan Kilborn @snafu423
      last edited by Alan Kilborn

      @snafu423

      Probably start by posting your Notepad++ Debug Info.

      Details on how to do that:
      In your Notepad++, click on the “?” menu (found to the right of “Window” in the menu bar). In the menu that drops down, choose “Debug Info…”. A dialog will open detailing specifics about your Notepad++ version, plugins, etc. CLICK ON THE BUTTON “Copy debug info into clipboard”. Do a PASTE HERE.

      S 1 Reply Last reply Reply Quote 2
      • PeterJonesP
        PeterJones @snafu423
        last edited by

        @snafu423 said in PythonScript: "New Script" not shown:

        after creating some random file, it does neither show up under
        => Plugins => Python Script => Scripts

        I had never noticed before, but I just tried the experiment: when you first create an empty file that way, it doesn’t show up. But as soon as you put any text in that script and save it (whether it’s just the initial from Npp import editor line, or even a simple # comment line), after you’ve saved it with content, then it does show up in the Scripts sub-menu. (One more experiment: I created a new file, then typed a space then a backspace, and saved it, and it still showed up. So it just takes an active save after creating the empty file for PythonScript to add it to the menu.)

        1 Reply Last reply Reply Quote 2
        • S
          snafu423 @Alan Kilborn
          last edited by

          @Alan-Kilborn

          this is what Debug Info tells:

          Notepad++ v8.9 (64-bit)
          Build time: Dec 27 2025 - 14:28:33
          Scintilla/Lexilla included: 5.5.8/5.4.6
          Boost Regex included: 1_85
          TinyXML-2 included: 11.0.0
          nlohmann JSON included: 3.12.0
          Path: C:_shared_apps\PortableApps\Notepad++Portable\App\Notepad++64\notepad++.exe
          Command Line:
          Admin mode: OFF
          Local Conf mode: ON
          Cloud Config: OFF
          Periodic Backup: ON
          Placeholders: OFF
          Scintilla Rendering Mode: SC_TECHNOLOGY_DIRECTWRITE (1)
          Multi-instance Mode: monoInst
          asNotepad: OFF
          File Status Auto-Detection: cdEnabledNew (for current file/tab only)
          Dark Mode: OFF
          Display Info:
          primary monitor: 1920x1080, scaling 100%
          visible monitors count: 3
          installed Display Class adapters:
          0000: Description - Intel® Arc™ 140V GPU (16GB)
          0000: DriverVersion - 32.0.101.8247
          OS Name: Windows 11 Enterprise (64-bit)
          OS Version: 24H2
          OS Build: 26100.8037
          Current ANSI codepage: 1252
          Plugins:
          ComparePlugin (2.0.2)
          mimeTools (3.1)
          NppConverter (4.7)
          NppExport (0.4)
          PythonScript (2.1)

          @PeterJones
          yes, I think what you describe is the way it should work … unfortunately, it does not for me 🤷

          Alan KilbornA mpheathM PeterJonesP 3 Replies Last reply Reply Quote 1
          • Alan KilbornA
            Alan Kilborn @snafu423
            last edited by

            @snafu423 said:

            PortableApps

            Are you truly using the “PortableApps” version of Notepad++?
            Or is this just your directory naming?

            1 Reply Last reply Reply Quote 0
            • mpheathM
              mpheath @snafu423
              last edited by

              @snafu423

              I installed PortableApps v30.3 with Notepad++ v8.9.3 into a virtual machine to test.

              The directory path expected from your Debug Info path for the scripts would be:

              C:\_shared_apps\PortableApps\Notepad++Portable\App\Notepad++64\plugins\Config\PythonScript\scripts
              

              This is the output from running UserInfo.py from my testing:

              # All paths listed in sys.path:
              C:\PortableApps\PortableApps\Notepad++Portable\App\Notepad++64\plugins\PythonScript\lib
              C:\PortableApps\PortableApps\Notepad++Portable\App\Notepad++64\plugins\Config\PythonScript\lib
              C:\PortableApps\PortableApps\Notepad++Portable\App\Notepad++64\plugins\PythonScript\scripts
              C:\PortableApps\PortableApps\Notepad++Portable\App\Notepad++64\plugins\Config\PythonScript\scripts
              C:\PortableApps\PortableApps\Notepad++Portable\App\Notepad++64\plugins\PythonScript\lib\lib-tk
              C:\PortableApps\PortableApps\Notepad++Portable\App\Notepad++64\plugins\PythonScript\python27.zip
              C:\PortableApps\PortableApps\Notepad++Portable\App\Notepad++64\DLLs
              C:\PortableApps\PortableApps\Notepad++Portable\App\Notepad++64\lib
              C:\PortableApps\PortableApps\Notepad++Portable\App\Notepad++64\lib\plat-win
              C:\PortableApps\PortableApps\Notepad++Portable\App\Notepad++64\lib\lib-tk
              C:\PortableApps\PortableApps\Notepad++Portable\App\Notepad++64
              C:\PortableApps\PortableApps\Notepad++Portable\App\Notepad++64\plugins\PythonScript
              C:\PortableApps\PortableApps\Notepad++Portable\App\Notepad++64\plugins\PythonScript\lib\site-packages
              
              # Can make user dirs:
              C:\PortableApps\PortableApps\Notepad++Portable\App\Notepad++64\plugins\Config\PythonScript\lib
              
              # Can add user scripts to the path:
              C:\PortableApps\PortableApps\Notepad++Portable\App\Notepad++64\plugins\Config\PythonScript\scripts
              
              # Can add user startup.py with this path:
              C:\PortableApps\PortableApps\Notepad++Portable\App\Notepad++64\plugins\Config\PythonScript\scripts\startup.py
              
              # Startup method:
              Undefined
              
              # Can add user libraries for importing to the path:
              C:\PortableApps\PortableApps\Notepad++Portable\App\Notepad++64\plugins\Config\PythonScript\lib
              
              # Can view documentation in this path:
              C:\PortableApps\PortableApps\Notepad++Portable\App\Notepad++64\plugins\PythonScript\doc
              
              

              Installed PortableApps to C:\PortableApps so the name looks doubled.

              It looks similar with the sub directory paths of the portable Notepad++ from Github.

              S 1 Reply Last reply Reply Quote 1
              • S
                snafu423 @mpheath
                last edited by snafu423

                hmmm, so it seems “portable version” and “pythonScript” not working together properly

                n.b.:

                C:_shared_apps\PortableApps\Notepad++Po…
                this shows a missing ‘\’ between ‘_shared’ and ‘_apps’ … not sure why the later ‘\’ are shown

                mpheathM 1 Reply Last reply Reply Quote 0
                • mpheathM
                  mpheath @snafu423
                  last edited by mpheath

                  @snafu423 I extracted PythonScript from a zip and so did not use the Plugin Admin. Did not detect PythonScript first time and moved the directory to other directories to see if would be detected there. Then moved it back and it was detected. It was unpredictable unless I made an error in judgement initially. I used these files:

                  NotepadPlusPlusPortable_8.9.3.paf.exe
                  PortableApps.com_Platform_Setup_30.3.paf.exe
                  PythonScript_Full_2.1.0.0_x64.zip
                  

                  If still not working for you then might be the PortableApps launcher playing tricks. It copies files before and after app execution so can be confusing about what it actually does and the effects it may cause.

                  The portable launcher I have used for many years is PStart and could probably use it to launch portable Notepad++ downloaded from Github and just set the environmental variables of AppData to write to the usb drive or however you use it.

                  n.b.:

                  A backslash is an escape character in markdown and an underscore is a special character. Like _italics_ is shown as italics though with leading underscore shows _italics so can use backquotes to avoid markdown processing. \_ together without backquotes removes the backslash to make the underscore literal.

                  Instruct the markdown processor to create code tags by using backquotes:

                  ```
                  \_ Block of code.
                  ```
                  
                  `\_ Inline code`
                  
                  1 Reply Last reply Reply Quote 0
                  • PeterJonesP
                    PeterJones @snafu423
                    last edited by

                    @snafu423 said in PythonScript: "New Script" not shown:

                    unfortunately, it does not for me
                    …
                    it seems “portable version” and “pythonScript” not working together properly

                    Yes, well, what PortableApps calls “Notepad++” is not actually Notepad++, but a modified/wrapped copy of Notepad++ that creates an abomination which has historically not worked in the same way that Notepad++'s core works, messing up the built-in functionality, plugin functionality, and confusing users into thinking that theirs is the only “portable” Notepad++, when really, Notepad++'s official portable zip file more accurately falls into the “truly portable” definition, beause it uses no wrapper or extra external system (as required by the “PortableApps.com_Platform_Setup” nonsense).

                    PortableApps modifies open source applications, and then distributes them with proprietary non-open-source changes, which violates (at least in spirit, if not in legal technicality) the open source license that Notepad++ is under. I highly recommend against using PortableApps – for Notepad++ or any other app – as there is no way to know how safe/secure their changes are… and because, at least with Notepad++, their modifications/wrapper is known to break the app (as you have found in this discussion).

                    If you want Notepad++ and its plugins to work as advertised, use the distributions, zips, and binaries from official sources. If you need a “portable launcher”, then I hope that the one @mpheath suggested works for you, so that you can move away from the PortableApps ecosystem and to using the official Notepad++.

                    And if you choose to continue using PortableApps, do not blame Notepad++ or its plugins for problems caused by PortableApps. PythonScript works just fine with official Notepad++, whether installed or the official portable, as I have been using it both ways for years.

                    Alan KilbornA S 2 Replies Last reply Reply Quote 1
                    • Alan KilbornA
                      Alan Kilborn @PeterJones
                      last edited by

                      @PeterJones said:

                      And if you choose to continue using PortableApps, do not blame Notepad++ or its plugins for problems caused by PortableApps.

                      Also, please don’t come HERE for help.

                      Alan KilbornA 1 Reply Last reply Reply Quote 1
                      • S
                        snafu423 @PeterJones
                        last edited by

                        @PeterJones
                        Thanks for explaining all this about PortableApps.com! I’m using it since at least ten years, but was not aware of those details.
                        Has been for me a handy way to move and sync “my preferred apps” on multiple PCs … looks like there’re some downsides to consider ;)

                        @mpheath
                        I’ll definitely take a look at PStart.
                        Over time I added some “non-native-PortableApps.com” apps to their launcher which works straight forward - but never thought of that other launchers might exist.

                        Now I did the same for notepad++: downloaded the portable version from this site, unzipped, reloaded apps … and it’s working like a charme :D

                        @Alan-Kilborn
                        at least I got a solution HERE and learned some new things

                        Thanks to all!

                        mpheathM 1 Reply Last reply Reply Quote 1
                        • mpheathM
                          mpheath @snafu423
                          last edited by mpheath

                          @snafu423 I had another test by renaming the doLocalConf.xml file to disable Notepad++ portable mode. The config folder moved from the root App directory into the root Data directory.

                          So the path becomes:

                          C:\_shared_apps\PortableApps\Notepad++Portable\Data\Config\plugins\config\PythonScript\scripts
                          

                          This is the tree with doLocalConf.xml file:

                          \---PortableApps
                              +---Notepad++Portable
                              |   +---App
                              |   |   \---Notepad++64
                              |   |       +---plugins
                              |   |       |   +---config                        # Config folder
                              |   |       |   |   \---PythonScript
                              |   |       |   |       \---scripts               # UserInfo.py is here
                              |   |       |   +---PythonScript                  # Plugin folder
                              |   +---Data
                              |   |   +---Config
                              |   |   |   +---backup
                              |   |   |   +---plugins
                              |   |   |   +---themes
                              |   |   |   \---userDefineLangs
                              |   |   \---settings
                          

                          without:

                          \---PortableApps
                              +---Notepad++Portable
                              |   +---App
                              |   |   \---Notepad++64
                              |   |       +---plugins
                              |   |       |   \---PythonScript                  # Plugin folder
                              |   +---Data
                              |   |   +---Config
                              |   |   |   +---backup
                              |   |   |   +---plugins
                              |   |   |   |   \---config                        # Config folder
                              |   |   |   |       \---PythonScript
                              |   |   |   |           \---scripts               # UserInfo.py is here
                              |   |   |   +---themes
                              |   |   |   \---userDefineLangs
                              |   |   +---settings
                              |   |   +---themes
                              |   |   \---toolbarIcons
                          

                          I removed excess to show important folders only. Added a few comments to highlight.

                          PortableApps may not be aware that the doLocalConf.xml file has this effect. Perhaps previously they did not redistribute the doLocalConf.xml file. UserInfo.py did move with the config folder which seems to be their method of setting a portable mode.

                          For you need to know which scripts folder path to insert your scripts for them to be listed by PythonScript.

                          S 1 Reply Last reply Reply Quote 0
                          • Alan KilbornA
                            Alan Kilborn @Alan Kilborn
                            last edited by Alan Kilborn

                            @Alan-Kilborn said:

                            Also, please don’t come HERE for help.

                            Hopefully, this statement I made was taken in the spirit intended.
                            I meant that we don’t support a PortableApps version of Notepad++ here.
                            It wastes everyone’s time and energy.
                            Of course you are definitely welcome here if you use Notepad++ in a supported manner.

                            1 Reply Last reply Reply Quote 0
                            • S
                              snafu423 @mpheath
                              last edited by

                              @mpheath

                              yes, I also noticed there were more than one folder which hold .py scripts … I tried to put my files in there, but they did never show up.

                              Anyway, since I use the “real” portable version it all works fine

                              FYI:
                              this is what the doLocalConf.xml from “their” portable Notepad++ contains:

                              <!--
                              Place "doLocalConf.xml" in the same directory as notepad++.exe
                              to make the Notepad++ read & write its configuration files (config.xml, langs.xml, styles.xml...etc)
                              from & to the same directory instead of the "%APPDATA%\Notepad++\" directory.
                              
                              This file can be empty; its contents are ignored."
                              -->
                              

                              @Alan-Kilborn
                              now - since I know - I do :D

                              Alan KilbornA 1 Reply Last reply Reply Quote 0
                              • Alan KilbornA
                                Alan Kilborn @snafu423
                                last edited by

                                @snafu423 said:

                                since I use the “real” portable version it all works fine

                                And this is the key point of this entire thread!

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