Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revisionLast revisionBoth sides next revision | ||
appwiki:notepadplusplus [2023/02/02 09:07] – [Qt GUI and PythonScript] ying | appwiki:notepadplusplus [2023/02/06 06:07] – [Integrate Your Python Script with Notepad++] ying | ||
---|---|---|---|
Line 90: | Line 90: | ||
* install: | * install: | ||
- | * from plugin manager | + | |
- | * or download manually and put in plugin folder from http:// | + | |
+ | * for tkinter lib, go lastest release version: https:// | ||
+ | * unzip PythonScript_TclTk_xxx.xxx.zip, | ||
+ | * (optional) unzip PythonScript_ExtraLibs_xxxx.zip if you need lib2to3, distutils, | ||
+ | * (outdate) <del>or download manually and put in plugin folder from http:// | ||
+ | </ | ||
* Python for Npp document | * Python for Npp document | ||
* http:// | * http:// | ||
Line 250: | Line 254: | ||
* the default loading directory for NppPythonScript plugin, any script will be automatically add to path for import < | * the default loading directory for NppPythonScript plugin, any script will be automatically add to path for import < | ||
npp\plugins\PythonScript\lib | npp\plugins\PythonScript\lib | ||
- | npp\plugins\PythonScript\scripts | + | npp\plugins\PythonScript\scripts |
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(" | install(" | ||
</ | </ | ||
+ | * add that standalone package path to PythonScript config startup.py file < | ||
+ | # notepad path\plugins\Config\PythonScript\scripts\startup.py | ||
+ | </ | ||
+ | # optional clear multiple python registered system path issue | ||
+ | old_path = sys.path | ||
+ | old_path = [x for x in old_path if not x.startswith(' | ||
+ | sys.path = old_path | ||
+ | # register lib path | ||
+ | import os | ||
+ | my_path_list =[ | ||
+ | r' | ||
+ | r' | ||
+ | r' | ||
+ | ] | ||
+ | for x in my_path_list: | ||
+ | if os.path.isdir(x): | ||
+ | sys.path.append(x) | ||
+ | |||
+ | </ | ||
==== My Npp Python Script ==== | ==== My Npp Python Script ==== | ||