<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Import Tkinter in PythonScript on Window]]></title><description><![CDATA[<p dir="auto">Hello,</p>
<p dir="auto">Window environment, So Python Script (Python version 2.7)</p>
<p dir="auto">The Tkinter module is not present.<br />
How can I integrate it for my macro?</p>
<p dir="auto">Thanks for your help</p>
<p dir="auto">Philippe Destrumel</p>
]]></description><link>https://community.notepad-plus-plus.org/topic/26652/import-tkinter-in-pythonscript-on-window</link><generator>RSS for Node</generator><lastBuildDate>Tue, 14 Jul 2026 19:00:21 GMT</lastBuildDate><atom:link href="https://community.notepad-plus-plus.org/topic/26652.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 24 Feb 2025 10:06:10 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Import Tkinter in PythonScript on Window on Mon, 24 Feb 2025 19:40:06 GMT]]></title><description><![CDATA[<p dir="auto">I have to go, but I will continue tomorrow.<br />
Thank you again for your answers.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/100019</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/100019</guid><dc:creator><![CDATA[Philippe Destrumel]]></dc:creator><pubDate>Mon, 24 Feb 2025 19:40:06 GMT</pubDate></item><item><title><![CDATA[Reply to Import Tkinter in PythonScript on Window on Mon, 24 Feb 2025 19:04:14 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/philippe-destrumel" aria-label="Profile: Philippe-Destrumel">@<bdi>Philippe-Destrumel</bdi></a> ,</p>
<p dir="auto">I cannot tell from your description whether you <em>just</em> installed ExtraLibs, or whether you did TclTk <em>and</em> ExtraLibs.  You need to do the TclTk.</p>
<p dir="auto">Also, your traceback is implying that it’s trying to use your <code>c:\python27\</code> installation of Python, rather than using the one in the PythonScript plugin.  Could you confirm for us whether you have <strong>Plugins &gt; Python Script &gt; Configuration…</strong> set such that <code>☐ Prefer installed Python libraries - ...</code> is checkmarked?  If it is, then you need to use your <code>pip</code> found somewhere in <code>c:\python27\...</code> hierarchy to install Tkinter there, rather than installing the copy of Tkinter for the Python Script plugin.</p>
<p dir="auto">(I personally don’t recommend using the “installed Python libraries”, as that tends to confuse users as to the purpose of PythonScript – it is not a plugin for developing random programs in Notepad++, it is a way to use the Python language to automate Notepad++.  But using the “installed Python libraries” does give the benefit of you’ve got the full <code>pip</code> interface for the installed version, so it makes it much easier to add libraries, if you need them for what you’re doing inside Notepad++, so I don’t say “don’t do it”, I just personally don’t suggest doing so for N++ users.  Since your script’s filename <code>npp_inspect_js.py</code> implies you are doing something inside Notepad++ with the script, I am not saying that you don’t understand the difference… but I just wanted to clarify for other readers.)</p>
]]></description><link>https://community.notepad-plus-plus.org/post/100017</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/100017</guid><dc:creator><![CDATA[PeterJones]]></dc:creator><pubDate>Mon, 24 Feb 2025 19:04:14 GMT</pubDate></item><item><title><![CDATA[Reply to Import Tkinter in PythonScript on Window on Mon, 24 Feb 2025 18:35:52 GMT]]></title><description><![CDATA[<p dir="auto">The problem moves. <a href="http://TKinter.py" rel="nofollow ugc">TKinter.py</a> is there, but another file is missing : _tkinter</p>
<p dir="auto">What I did:</p>
<ul>
<li>downloaded PythonScript_ExtraLibs_2.0.0.0_x64.zip</li>
<li>copied the contents of the lib folder of this zip into notepad++:<br />
-&gt; c:\Program Files\Notepad++\plugins\PythonScript\lib<br />
An error is raised:</li>
</ul>
<p dir="auto">Thank you for your help</p>
<pre><code>Traceback (most recent call last):
  File "C:\Users\33684\AppData\Roaming\Notepad++\plugins\Config\PythonScript\scripts\npp_inspect_js.py", line 120, in &lt;module&gt;
    import Tkinter as tk
  File "C:\Python27\Lib\lib-tk\Tkinter.py", line 38, in &lt;module&gt;
    import FixTk
  File "C:\Python27\Lib\lib-tk\FixTk.py", line 65, in &lt;module&gt;
    import _tkinter
ImportError: DLL load failed: Le module sp飩fi頥st introuvable.
</code></pre>
<p dir="auto">Afficher le dictionnaire<br />
21 / 5 000</p>
]]></description><link>https://community.notepad-plus-plus.org/post/100015</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/100015</guid><dc:creator><![CDATA[Philippe Destrumel]]></dc:creator><pubDate>Mon, 24 Feb 2025 18:35:52 GMT</pubDate></item><item><title><![CDATA[Reply to Import Tkinter in PythonScript on Window on Mon, 24 Feb 2025 17:42:55 GMT]]></title><description><![CDATA[<p dir="auto">Merci pour vos réponses. J’essaie ça immédiatement.<br />
Puis vous fait un retour</p>
]]></description><link>https://community.notepad-plus-plus.org/post/100013</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/100013</guid><dc:creator><![CDATA[Philippe Destrumel]]></dc:creator><pubDate>Mon, 24 Feb 2025 17:42:55 GMT</pubDate></item><item><title><![CDATA[Reply to Import Tkinter in PythonScript on Window on Mon, 24 Feb 2025 15:44:01 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/philippe-destrumel" aria-label="Profile: Philippe-Destrumel">@<bdi>Philippe-Destrumel</bdi></a> ,</p>
<p dir="auto">Oh, even better: if you download the <code>PythonScript_2.1.0.0_x64.msi</code> or <code>PythonScript_3.0.21.0_x64.msi </code> (as appropriate), then it will install the full PythonScript plugin with Python 2.7 or 3.12, and it will give you the option of installing the Tcl/Tk libraries at the same time.  That’s probably the easiest way.</p>
<p dir="auto">So my new recommendation is:</p>
<ul>
<li>If you want to stick with Python 2.7, download and run the 2.1.0.0 MSI installer, and choose to add in the Tcl/Tk libraries when prompted for optional portions</li>
<li>If you only deal with UTF-8 (or only use standard US ANSI text), and want to switch to Python 3.12, you should
<ul>
<li>uninstall Python 2.0.0.0 using Plugins Admin</li>
<li>download and run the 3.0.21 MSI (future readers should look for the most recent alpha version), choosing Tcl/Tk when prompted for optional portions</li>
</ul>
</li>
</ul>
<p dir="auto"><img src="/assets/uploads/files/1740411825155-0d402dae-9f0d-4842-9fb4-056edecdd6f2-image.png" alt="0d402dae-9f0d-4842-9fb4-056edecdd6f2-image.png" class=" img-fluid img-markdown" /></p>
]]></description><link>https://community.notepad-plus-plus.org/post/100012</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/100012</guid><dc:creator><![CDATA[PeterJones]]></dc:creator><pubDate>Mon, 24 Feb 2025 15:44:01 GMT</pubDate></item><item><title><![CDATA[Reply to Import Tkinter in PythonScript on Window on Mon, 24 Feb 2025 15:33:57 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/philippe-destrumel" aria-label="Profile: Philippe-Destrumel">@<bdi>Philippe-Destrumel</bdi></a> ,</p>
<p dir="auto">Tkinter doesn’t come by default with the PythonScript plugin.  However, since you’re still on v2.0.0, you can go to the <a href="https://github.com/bruderstein/PythonScript/releases/tag/v2.0.0" rel="nofollow ugc">v2.0.0 download page</a>, and download the <code>PythonScript_TclTk_2.0.0.0_x64.zip</code>.  That zipfile contains a <code>plugins\PythonScript\lib</code> hierarchy with the various Tcl, Tk, and related library files; if you unzip all of those into your existing <code>c:\Program Files\Notepad++\plugins\PythonScript\lib</code> hierarchy, then exit and restart Notepad++, you</p>
<p dir="auto">(see also <a href="https://community.notepad-plus-plus.org/post/93873">this discussion from last year</a>, where <a class="plugin-mentions-user plugin-mentions-a" href="/user/alan-kilborn" aria-label="Profile: alan-kilborn">@<bdi>alan-kilborn</bdi></a> explains the same steps)</p>
<p dir="auto">However, I might recommend that instead of sticking with v2.0.0:</p>
<ul>
<li>If you need to stay with Python 2.7, there is a newer version of PythonScript v2.1.0 available at <a href="https://github.com/bruderstein/PythonScript/releases/tag/v2.1.0" rel="nofollow ugc">https://github.com/bruderstein/PythonScript/releases/tag/v2.1.0</a>, which includes many improvements, including compatibility with Notepad++ v8.7.5-and-newer, so you would be able to upgrade Notepad++ going forward
<ul>
<li>you can manually download the <code>PythonScript_Full_2.1.0.0_x64_PluginAdmin.zip</code> and unzip it into the appropriate directories, to install the base PythonScript v2.1.0
<ul>
<li>you may have to uninstall the old copy first; I haven’t tried this sequence.  But it might be easier to upgrade Notepad++ to v8.7.5 or newer, then use Plugins Admin to upgrade PythonScript to v2.1.0</li>
</ul>
</li>
<li>then you would grab and unzip <code>PythonScript_TclTk_2.1.0.0_x64.zip</code> to get the Tcl/Tk libraries</li>
</ul>
</li>
<li>If you only deal with UTF-8 files, and you would rather ditch the old Python 2.7 and move to Python 3.12, you can use the most recent alpha release of PythonScript 3 – currently at 3.0.21 <a href="https://github.com/bruderstein/PythonScript/releases/tag/v3.0.21" rel="nofollow ugc">https://github.com/bruderstein/PythonScript/releases/tag/v3.0.21</a>
<ul>
<li>you would uninstall the old PythonScript using the Plugins Admin</li>
<li>then grab and unzip <code>PythonScript_Full_3.0.21.0_x64_PluginAdmin.zip</code></li>
<li>then grab and unzip <code>PythonScript_TclTk_3.0.21.0_x64.zip</code></li>
</ul>
</li>
</ul>
]]></description><link>https://community.notepad-plus-plus.org/post/100011</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/100011</guid><dc:creator><![CDATA[PeterJones]]></dc:creator><pubDate>Mon, 24 Feb 2025 15:33:57 GMT</pubDate></item><item><title><![CDATA[Reply to Import Tkinter in PythonScript on Window on Mon, 24 Feb 2025 15:10:55 GMT]]></title><description><![CDATA[<p dir="auto">Clarification on my Notepad/PythonScript configuration:<br />
Notepad++ v8.7.4   (64-bit)<br />
Build time : Dec  4 2024 - 23:50:05<br />
Path : C:\Program Files\Notepad++\notepad++.exe<br />
Command Line :<br />
Admin mode : OFF<br />
Local Conf mode : OFF<br />
Cloud Config : OFF<br />
Periodic Backup : ON<br />
Placeholders : OFF<br />
DirectWrite : ON<br />
Multi-instance Mode : monoInst<br />
File Status Auto-Detection : cdEnabledNew (for current file/tab only)<br />
Dark Mode : OFF<br />
OS Name : Windows 11 Home (64-bit)<br />
OS Version : 23H2<br />
OS Build : 22631.4890<br />
Current ANSI codepage : 1252<br />
Plugins :<br />
jN (2.2.190.21986)<br />
JsMapParser.NppPlugin (4.2)<br />
mimeTools (3.1)<br />
NppConverter (4.6)<br />
NppExec (0.8.8)<br />
NppExport (0.4)<br />
PythonScript (2)<br />
SessionMgr (1.4.4)</p>
<p dir="auto">Thanks for your help</p>
<p dir="auto">Philippe Destrumel</p>
]]></description><link>https://community.notepad-plus-plus.org/post/100010</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/100010</guid><dc:creator><![CDATA[Philippe Destrumel]]></dc:creator><pubDate>Mon, 24 Feb 2025 15:10:55 GMT</pubDate></item></channel></rss>