appwiki:notepadplusplus

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
appwiki:notepadplusplus [2023/02/02 09:07] – [Qt GUI and PythonScript] yingappwiki:notepadplusplus [2023/02/06 06:40] (current) – [Plugin - PythonScript] ying
Line 90: Line 90:
  
   * install:   * install:
-    * from plugin manager +    * install/get latest notepad++ 
-    * or download manually and put in plugin folder from http://npppythonscript.sourceforge.net/ +    * from plugin manager, search python script, check and install (default is v2, w python 2.7.18, you can use same method to manually use alpha py3.10.9 version with same method) 
 +    * for tkinter lib, go lastest release version: https://github.com/bruderstein/PythonScript/releases/ 
 +      * unzip PythonScript_TclTk_xxx.xxx.zip, and copy lib into npp/plugins/PythonScripts lib folder. 
 +      * (optional) unzip  PythonScript_ExtraLibs_xxxx.zip if you need lib2to3, distutils,bsddb 
 +    * (outdate) <del>or download manually and put in plugin folder from http://npppythonscript.sourceforge.net/ 
 +</del>
   * Python for Npp document   * Python for Npp document
     * http://npppythonscript.sourceforge.net/docs/latest/     * http://npppythonscript.sourceforge.net/docs/latest/
Line 250: Line 254:
   * the default loading directory for NppPythonScript plugin, any script will be automatically add to path for import <code>   * the default loading directory for NppPythonScript plugin, any script will be automatically add to path for import <code>
 npp\plugins\PythonScript\lib npp\plugins\PythonScript\lib
-npp\plugins\PythonScript\scripts +npp\plugins\PythonScript\scripts (default startup.py is here)
 npp\plugins\Config\PythonScript\lib npp\plugins\Config\PythonScript\lib
 npp\plugins\Config\PythonScript\scripts npp\plugins\Config\PythonScript\scripts
Line 350: Line 354:
 install("PySide2") install("PySide2")
 </code> </code>
 +  * add that standalone package path to PythonScript config startup.py file <code>
 +# notepad path\plugins\Config\PythonScript\scripts\startup.py
 +</code> and code <code python>
 +# optional clear multiple python registered system path issue
 +old_path = sys.path
 +old_path = [x for x in old_path if not x.startswith('D:\\my_other_system_env_registered_python_path\\Python27') ]
 +sys.path = old_path
  
 +# register lib path
 +import os
 +my_path_list =[
 +    r'D:\my_path_match_version_local_python_path\Python27\Lib\site-packages',
 +    r'D:\my_path_to_other_mpp_app_i_write\NppCoder',
 +    r'D:\my_path_to_other_npp_script\npp_script'
 +    ]
 +for x in my_path_list:
 +    if os.path.isdir(x):
 +        sys.path.append(x)
 +
 +</code>
 ==== My Npp Python Script ==== ==== My Npp Python Script ====
  
  • appwiki/notepadplusplus.1675328844.txt.gz
  • Last modified: 2023/02/02 09:07
  • by ying