tag:blogger.com,1999:blog-75937196229194307482024-03-17T20:02:46.477-07:00PyScripterThis is a blog about the Python IDE <a href="https://github.com/pyscripter/pyscripter/wiki">PyScripter</a>PyScripterhttp://www.blogger.com/profile/01872810912511222321noreply@blogger.comBlogger120125tag:blogger.com,1999:blog-7593719622919430748.post-87077825612193319632023-11-08T02:43:00.001-08:002023-11-08T02:43:59.122-08:00PyScripter v4.3.4 released<p>PyScripter 4.3.4 is now available at <a href="https://sourceforge.net/projects/pyscripter/files/PyScripter-v4.3/">Sourceforge</a>. It is hotfix release that has replaced version 4.3.3.  It fixes an issue an incompatibility with python versions older than 3.10. There is no need to upgrade if you a more recent version of python.</p>PyScripterhttp://www.blogger.com/profile/01872810912511222321noreply@blogger.com0tag:blogger.com,1999:blog-7593719622919430748.post-39625013805673709652023-10-30T20:57:00.001-07:002023-10-30T20:57:55.756-07:00PyScripter v4.3.3 released<p>PyScripter 4.3.3 is now available at <a href="https://sourceforge.net/projects/pyscripter/files/PyScripter-v4.3/">Sourceforge</a>. It is hotfix release that has quietly replaced version 4.3.2.  It is recommended that you upgrade to this new version.  It fixes an issue with the input function in python 12.</p>PyScripterhttp://www.blogger.com/profile/01872810912511222321noreply@blogger.com4tag:blogger.com,1999:blog-7593719622919430748.post-12664587257301910132023-10-29T12:56:00.001-07:002023-10-29T12:56:09.823-07:00PyScripter v4.3.2 released<p>PyScripter 4.3.2 is now available at <a href="https://sourceforge.net/projects/pyscripter/files/PyScripter-v4.3/">Sourceforge</a>. It is hotfix release that has quietly replaced version 4.3.1.  It is recommended that you upgrade to this new version.  Besides a few bug fixes and stability improvements, it adds an exciting new feature “<a href="https://pyscripter.blogspot.com/2023/10/feature-preview-debug-inspectors.html">Variable Inspectors</a>”.</p>PyScripterhttp://www.blogger.com/profile/01872810912511222321noreply@blogger.com0tag:blogger.com,1999:blog-7593719622919430748.post-8605534598457284102023-10-28T13:34:00.004-07:002023-10-29T04:53:21.130-07:00Feature preview: Variable Inspectors<p>Variable inspectors, also known as <strong>debug visualizers</strong>, allow you to visually inspect variables of certain data types. Let’s start with an example.</p> <p><a href="https://drive.google.com/uc?id=1bzrvvn2nKPk2rs-O_r1bgpqf6Y4FZlQO"><img alt="Variables" border="0" height="62" src="https://drive.google.com/uc?id=1lZBIac6vXMpfSnvR0ZNvH3jjknkzZsZN" style="background-image: none; display: inline;" title="Variables" width="244" /></a></p> <p>The Variables window got a new column highlighted in red above. A magnifying glass is shown for variables that can be inspected. Clicking this magnifying glass, opens a window that provides a visual view of that variable, in this case a pandas dataframe:</p> <p><a href="https://drive.google.com/uc?id=1bRd8P110ZuNRuTOgqBt3IgEgzIwSlUzy"><img alt="iris" border="0" height="132" src="https://drive.google.com/uc?id=1pd_5-IrNyrenhU-nM5ASmkMwk42id6gQ" style="background-image: none; display: inline;" title="iris" width="244" /></a></p> <p>In this window you can view the data in tabular form, show summary statistics and create a wide range of graphs.</p> <p>This feature is also available for variables you create in the interpreter window. Initially, inspectors are provided for numpy 1 and 2-dimensional arrays, numpy matrices and pandas dataframes. These inspectors are based on the <a href="https://github.com/dmnfarrell/pandastable">pandastable package</a>, which you need to install using pip for the inspector to work. However, since variable inspectors are based on python code, you can create your own visualisers or modify existing ones</p> <h3>Under the hood</h3> <p>The installer creates a new subdirectory “Variable Inspectors” under %ALLUSERSPROFILE%\PyScripter (typically C:\ProgramData\PyScripter) and installs the factory provided inspectors in this folder. PyScripter creates another “Variable Inspectors” folder under %APPDATA%\PyScripter (typically C:\Users\UserName\AppData\Roaming\PyScripter). In the latter you can create your own inspectors. Registry free installations get instead just one “Variable Inspectors” folder under the root folder containing PyScripter.exe.</p> <p>Each inspector is located in a subfolder of the “Variable Inspectors” folder. The name of the subfolder is not important, but its contents are. At a minimum this subfolder should contain two files:</p> <ol> <li>handled_classes.text</li> <li>main.py</li> </ol> <p>The first one contains a list of python classes that can be handled by the inspector in the form module_name.class_name. The python file “main.py” contains code that:</p> <ol> <li>Checks that its dependencies are installed. If not, it provides an informative message box.</li> <li>Loads a pickled value from a file name that is provided as the first command line parameter.</li> <li>Checks that the provided value is of a supported type and then provides a visual inspection of that value.</li> </ol> <p>It is recommended that a third file “requirements.txt” is also included, listing the package dependencies of the inspector. The user has to make sure that these dependencies are installed via pip (could be automated in the future).</p>PyScripterhttp://www.blogger.com/profile/01872810912511222321noreply@blogger.com0tag:blogger.com,1999:blog-7593719622919430748.post-14858587317993510462023-10-23T11:35:00.001-07:002023-10-23T11:35:19.222-07:00PyScripter 4.3.1 released<p>PyScripter 4.3.1 is now available at <a href="https://sourceforge.net/projects/pyscripter/files/PyScripter-v4.3/">Sourceforge</a>. It is hotfix release that has quietly replaced version 4.3.0.  It is recommended that you upgrade to this new version.</p>PyScripterhttp://www.blogger.com/profile/01872810912511222321noreply@blogger.com0tag:blogger.com,1999:blog-7593719622919430748.post-31270969607522249142023-10-13T14:58:00.002-07:002023-10-15T03:38:26.254-07:00PyScripter 4.3.0 released<p>PyScripter 4.3.0 is now available at <a href="https://sourceforge.net/projects/pyscripter/files/PyScripter-v4.3/">Sourceforge</a>. This release provides support for python 12 as well as other new features, enhancements and bug fixes:</p> <p><strong>New features:</strong></p> <ul> <li>Python 3.12 support</li> <li>Improved multi-monitor support (per monitor DPI awareness)</li> <li>Customizable user interface content font size <a href="https://github.com/pyscripter/pyscripter/issues/1209">(#1209</a>)</li> <li>Screen reader support in the editor</li> </ul> <p><strong>Issues addressed:</strong></p> <ul> <li><a href="https://github.com/pyscripter/pyscripter/issues/1172">#1172</a>, <a href="https://github.com/pyscripter/pyscripter/issues/1195">#1195</a>, <a href="https://github.com/pyscripter/pyscripter/issues/1197">#1197</a>, <a href="https://github.com/pyscripter/pyscripter/issues/1198">#1198</a>, <a href="https://github.com/pyscripter/pyscripter/issues/1199">#1199</a>, <a href="https://github.com/pyscripter/pyscripter/issues/1200">#1200</a>, <a href="https://github.com/pyscripter/pyscripter/issues/1208">#1208</a>, <a href="https://github.com/pyscripter/pyscripter/issues/1210">#1210</a>, <a href="https://github.com/pyscripter/pyscripter/issues/1212">#1212</a>, <a href="https://github.com/pyscripter/pyscripter/issues/1214">#1214</a>, <a href="https://github.com/pyscripter/pyscripter/issues/1221">#1221</a></li> </ul>PyScripterhttp://www.blogger.com/profile/01872810912511222321noreply@blogger.com0tag:blogger.com,1999:blog-7593719622919430748.post-37972458645763331282023-07-21T09:07:00.001-07:002023-07-21T09:07:47.500-07:00Preview of the upcoming PyScripter version<p>I have been busy preparing the next version of PyScripter. Apart from bug fixes, this version improves the support of multiple monitors (per monitor DPI awareness) and  accessibility, (support for screen readers in the editor), but also brings compatibility with python 3.12 which is still in beta.</p> <p>If you are using multi-monitor setups, it would be helpful to test the <a href="https://drive.google.com/file/d/1_zko1XqzuE_xyl6DEDstx42LBI4bV1MV/view?usp=drive_link">preview version 4.2.9</a>.  This zip file contains just the PyScripter executable.   You just replace the executable in a 4.2 distribution with the one in the zip file.   Please report any issues to the <a href="https://github.com/pyscripter/pyscripter/issues">PyScripter issue tracker</a>.</p>PyScripterhttp://www.blogger.com/profile/01872810912511222321noreply@blogger.com2tag:blogger.com,1999:blog-7593719622919430748.post-38036203393939825752023-06-05T18:09:00.001-07:002023-06-05T18:09:51.159-07:00Using PyScripter with QGIS<p>This is a solution contributed by Andreas (github user name amr).  For a complete integration of PyScripter with QGIS you need two things: </p> <ol> <li>Batch-File: The following is for the LTR-version of QGIS. It is a modified version of the existing python-qgis-ltr.bat in the folder "OSGeo4W\bin". Some changes were made to it, essentially using absolute paths to both the OSGeo4W and PyScripter installation folders. Please change the paths, if yours differ!</li> <p> </p> <blockquote> <pre><code><font size="2">@echo off
:: path for OSGeo4W/QGIS
set O4W=C:\OSGeo4W
:: path for PyScripter
set PYSC=C:\Program Files\PyScripter
:: changed start procedure
call "%O4W%\bin\o4w_env.bat"
@echo off
:: add python dir to path
path %OSGEO4W_ROOT%\apps\qgis-ltr\bin;%OSGEO4W_ROOT%\apps\Python39;%PATH%
set QGIS_PREFIX_PATH=%OSGEO4W_ROOT:\=/%/apps/qgis-ltr
set GDAL_FILENAME_IS_UTF8=YES
rem Set VSI cache to be used as buffer, see #6448
set VSI_CACHE=TRUE
set VSI_CACHE_SIZE=1000000
set QT_PLUGIN_PATH=%OSGEO4W_ROOT%\apps\qgis-ltr\qtplugins;%OSGEO4W_ROOT%\apps\qt5\plugins
set PYTHONPATH=%OSGEO4W_ROOT%\apps\qgis-ltr\python;%PYTHONPATH%
:: start PyScripter
start "PyScripter" /B "%PYSC%\PyScripter.exe" --PYTHON39 --pythondllpath=%OSGEO4W_ROOT%\apps\python39 %*</font></code></pre>
<pre><code>
</code></pre>
</blockquote>
<li>Start-Script for the Python-Interpreter: It uses the path variable and adds each path to the DLL-search path. Store this as "sitecustomize.py" into the folder OSGeo4W\apps\Python39</li>
</ol>
<blockquote>
<pre>#sitecustomize.py
import os
for p in os.getenv("PATH").split(";"):
if os.path.exists(p):
os.add_dll_directory(p)</pre></blockquote>PyScripterhttp://www.blogger.com/profile/01872810912511222321noreply@blogger.com0tag:blogger.com,1999:blog-7593719622919430748.post-2152940858639851022022-12-21T23:11:00.001-08:002022-12-21T23:11:10.513-08:00PyScripter v4.2.5 released<p>Yet another hotfix release, PyScripter 4.2.4 is now available at <a href="https://sourceforge.net/projects/pyscripter/files/PyScripter-v4.2/">Sourceforge</a>.  A scaling issue in code completion is fixed.  This only affected users whose primary monitor is high-DPI (scaling > 100%).</p>PyScripterhttp://www.blogger.com/profile/01872810912511222321noreply@blogger.com2tag:blogger.com,1999:blog-7593719622919430748.post-39974290877802409202022-12-15T05:13:00.001-08:002022-12-15T05:13:51.237-08:00PyScripter v4.2.4 released<p>PyScripter 4.2.4 is now available at <a href="https://sourceforge.net/projects/pyscripter/files/PyScripter-v4.2/">Sourceforge</a>. It is hotfix release that has quietly replaced earlier 4.2 versions. The only thing fixed, compared to v4.2.3 is the missing manifest file, resulting in less crispy fonts, if your monitor scaling is greater than 100% (high-DPI monitors).   If your monitor scaling is 100%, there is no need to upgrade.</p>PyScripterhttp://www.blogger.com/profile/01872810912511222321noreply@blogger.com0tag:blogger.com,1999:blog-7593719622919430748.post-46224146224476205722022-12-13T09:00:00.001-08:002022-12-13T09:00:02.345-08:00PyScripter v4.2.3 released<p>PyScripter 4.2.3 is now available at <a href="https://sourceforge.net/projects/pyscripter/files/PyScripter-v4.2/">Sourceforge</a>. It is a hotfix release that deals with a <a href="https://github.com/python/cpython/issues/100171">regression</a> in the recently released python 3.11.1.  If you are not using this python version, then there is no reason to upgrade from v4.2.2. This version has replaced earlier 4.2 versions. </p>PyScripterhttp://www.blogger.com/profile/01872810912511222321noreply@blogger.com0tag:blogger.com,1999:blog-7593719622919430748.post-74881330900732516882022-12-07T20:28:00.001-08:002022-12-07T20:28:14.757-08:00Format your python code using “black”<p><img alt="Black Logo" src="https://raw.githubusercontent.com/psf/black/main/docs/_static/logo2-readme.png" width="153" height="56" /></p> <p>The python style guide <a href="https://peps.python.org/pep-0008/">PEP 8</a> by the creator of the language Guido van Rossum is the universal standard that most python programmers strive to follow.  There are many modules that can format python code to make it compliant with the style guide, but recently one of them, “<a href="https://github.com/psf/black">black</a>” is rapidly becoming the standard.</p> <p>It is very easy to integrate this module with PyScripter.  </p> <ol> <li>First you need to install it using Tools, Tools, Install Packages with pip</li> <li>Then, use the menu commands Tools, Configure Tools, Add to add a new external tool</li> <li>Fill in the dialog box as indicated below</li> </ol> <p> </p> <a href="https://drive.google.com/uc?id=1sO1rPkJa9wIKre0kpIS0Cvtt6POROv0E"><img title="black" style="margin-right: auto; margin-left: auto; float: none; display: block; background-image: none;" border="0" alt="black" src="https://drive.google.com/uc?id=1RhQ02CVqz_r2Rq1AEBs7NodYim0PtcsK" width="311" height="362" /></a> <p>Set:</p> <p>Name: Format Selection</p> <p>Description: Format selected code using the “black” module</p> <p>Command: $[PythonExe-Short]</p> <p> </p> <table cellspacing="0" cellpadding="2" width="80%" border="0"><tbody> <tr> <td valign="top" width="10">Name: </td> <td valign="top" width="92">Format Selection</td> </tr> <tr> <td valign="top" width="10">Description: </td> <td valign="top" width="92">Format selected code using the “black” module</td> </tr> <tr> <td valign="top" width="10">Command:</td> <td valign="top" width="92">$[PythonExe-Short]</td> </tr> <tr> <td valign="top" width="10">Parameters:</td> <td valign="top" width="92">-m black -</td> </tr> <tr> <td valign="top" width="10">Shortcut:</td> <td valign="top" width="92">Shift+Alt+F</td> </tr> <tr> <td valign="top" width="10">Context:</td> <td valign="top" width="92">Selection Available</td> </tr> <tr> <td valign="top" width="10">Std. Input:</td> <td valign="top" width="92">Selection</td> </tr> <tr> <td valign="top" width="10">Std. Ouput</td> <td valign="top" width="92">Selection</td> </tr> </tbody></table> <p>Also check “Hide console” and “UTF8 IO” and press  OK.</p> <p>You are all set.   Select some code or press Ctrl+A to select the whole file and invoke the Format Selection command using the shortcut or via the Tools menu.</p> <p>This tool definition is available with release 4.2.2 in new installations, but you need to add it manually to existing installations.</p>PyScripterhttp://www.blogger.com/profile/01872810912511222321noreply@blogger.com0tag:blogger.com,1999:blog-7593719622919430748.post-54155085119924490492022-12-07T19:26:00.001-08:002022-12-07T19:26:26.908-08:00PyScripter v4.2.2 released<p>PyScripter 4.2.2 is now available at <a href="https://sourceforge.net/projects/pyscripter/files/PyScripter-v4.2/">Sourceforge</a>. It is hotfix release that has quietly replaced earlier 4.2 versions.  It fixes a number of reported issues, but also includes new features.</p> <p><strong>New features:</strong></p> <ul> <li>The dated Internet Explorer replaced with the Edge browser</li> <li>Added Format Selection external tool using the "black" module</li> <li>New IDE option 'Automatic Restart' (<a href="https://github.com/pyscripter/pyscripter/issues/1188">#1188</a>)</li> <li>Recovery of unsaved files on system shutdown or application crash</li> <li>New IDE command "Zoom Reset" Atl+Num 0  <a href="https://github.com/pyscripter/pyscripter/issues/650">(#650</a>)</li> <li>Two new styles added: Windows 11 Polar Dark and Windows 11 Polar Light</li> </ul> <p><strong>Issues addressed:</strong></p> <ul> <li><a href="https://github.com/pyscripter/pyscripter/issues/1152">#1152</a>, <a href="https://github.com/pyscripter/pyscripter/issues/1155">#1155</a>, <a href="https://github.com/pyscripter/pyscripter/issues/1177">#1177</a>, <a href="https://github.com/pyscripter/pyscripter/issues/1181">#1181</a>, <a href="https://github.com/pyscripter/pyscripter/issues/1182">#1182</a>, <a href="https://github.com/pyscripter/pyscripter/issues/1183">#1183</a>, <a href="https://github.com/pyscripter/pyscripter/issues/1185">#1185</a>, <a href="https://github.com/pyscripter/pyscripter/issues/1186">#1186</a>, <a href="https://github.com/pyscripter/pyscripter/issues/1187">#1187</a>, <a href="https://github.com/pyscripter/pyscripter/issues/1189">#1189</a></li> </ul>PyScripterhttp://www.blogger.com/profile/01872810912511222321noreply@blogger.com0tag:blogger.com,1999:blog-7593719622919430748.post-59062885482065246512022-11-09T18:53:00.001-08:002022-11-09T18:53:50.604-08:00PyScripter 4.2.1 released<p>PyScripter 4.2.1 is now available at <a href="https://sourceforge.net/projects/pyscripter/files/PyScripter-v4.2/">Sourceforge</a>. It is hotfix release that has quietly replaced version 4.2.0.  It fixes a couple of reported issues:</p> <ul> <li>Toolbar icon colors lost (<a href="https://github.com/pyscripter/pyscripter/issues/1182">#1182</a>)</li> <li>Add Option to show/hide indentation guides (<a href="https://github.com/pyscripter/pyscripter/issues/1181">#1181</a>)</li> </ul> <p>To hide or configure indentation guides (the vertical dotted lines that show the indentation level of different blocks of code) you use the menu commands Tools, Options, IDE Options and then navigate to  Editor, "Indentation guides".</p>PyScripterhttp://www.blogger.com/profile/01872810912511222321noreply@blogger.com0tag:blogger.com,1999:blog-7593719622919430748.post-57626039448248441812022-11-06T11:51:00.001-08:002022-11-06T11:51:38.510-08:00Context sensitive help<p>One of the useful features of PyScripter has been the integration with the python help file.  For instance if you type in the editor</p> <blockquote> <p>for i in range(100):</p> </blockquote> <p>then place the cursor inside “range”and press F1, you get help on the “range” python object.</p> <p>This integration requires the presence of the python HTML Help file (with extension “chm”)  in the “Doc” subdirectory of your Python installation.  Standard python distributions from python.org, included such file.   But, python 11 does not.  It only includes plain HTML documentation.   Other distributions such as Anaconda, don’t include any documentation.  </p> <p>You can get the python 11 HTML Help file from this <a href="https://www.python.org/ftp/python/3.11.0/python3110a5.chm">link</a>.  Download and copy the file inside the Doc subdirectory of the python installation and context sensitive help will work as before.  You can also do the same with other python distributions missing the HTML Help file.</p>PyScripterhttp://www.blogger.com/profile/01872810912511222321noreply@blogger.com0tag:blogger.com,1999:blog-7593719622919430748.post-33795205556904652632022-11-06T10:39:00.001-08:002022-11-06T10:39:54.916-08:00PyScripter 4.2.0 released<p>PyScripter 4.2 is now available at <a href="https://sourceforge.net/projects/pyscripter/files/PyScripter-v4.2/">Sourceforge</a>.  This release provides support for python 11 as well as many new features, enhancements and bug fixes:</p> <p><strong>New features:</strong></p> <ul> <li>Python 3.11 support added - Support for python 3.6 removed </li> <li><a href="https://pyscripter.blogspot.com/2022/10/feature-preview-spell-checking.html">Spell checking</a> of comments and strings <a href="https://github.com/pyscripter/pyscripter/issues/84">#84</a></li> <li><a href="https://pyscripter.blogspot.com/2022/10/new-feature-track-changes-bar.html">Track changes bar</a> as in Visual Studio </li> <li>Editor <a href="https://pyscripter.blogspot.com/2022/10/feature-preview-better-unicode-handling.html">Unicode handling improvements</a> (emojis, bi-directional text, etc.) </li> <li>Editor <a href="https://pyscripter.blogspot.com/2022/10/new-feature-preview-selection-color.html">selection options</a> (alpha blending, fill whole lines) </li> <li>Portuguese translations (pt_PT, pt_BR) added</li> </ul> <p><strong>Issues addressed:</strong></p> <ul> <ul> <li><a href="https://github.com/pyscripter/pyscripter/issues/1140">#1140</a>, <a href="https://github.com/pyscripter/pyscripter/issues/1146">#1146</a>, <a href="https://github.com/pyscripter/pyscripter/issues/1149">#1149</a>, <a href="https://github.com/pyscripter/pyscripter/issues/1151">#1151</a>, <a href="https://github.com/pyscripter/pyscripter/issues/1163">#1163</a>, <a href="https://github.com/pyscripter/pyscripter/issues/1165">#1165</a></li> </ul> </ul>PyScripterhttp://www.blogger.com/profile/01872810912511222321noreply@blogger.com0tag:blogger.com,1999:blog-7593719622919430748.post-65620831706700663252022-10-28T15:03:00.001-07:002022-10-28T15:03:08.869-07:00New feature preview: Selection color options<p>One of the editor improvements is the ability to customize the painting of text selection.  The default option now is the alpha blending of the selection color with the background.</p> <p>Selection in previous versions:</p> <a href="https://drive.google.com/uc?id=1p7ymwJSG-EDYbVebvq3WwxPvue4CuVTt"><img title="Before" style="margin-right: auto; margin-left: auto; float: none; display: block; background-image: none;" border="0" alt="Before" src="https://drive.google.com/uc?id=1N55YnlaIxqeiNtuZ1CJBU0ISbx9LzgOp" width="458" height="163" /></a> <p>Current default selection painting (alpha blending):</p> <a href="https://drive.google.com/uc?id=1wK7pQXu9dT5eNiIcJFyaGeqau7Dfsrqg"><img title="Current" style="margin-right: auto; margin-left: auto; float: none; display: block; background-image: none;" border="0" alt="Current" src="https://drive.google.com/uc?id=1fAhoxEf9yzbIqQnyBsOBnULHCQ16szTH" width="466" height="195" /></a> <p> </p> <p>In previous versions, when a whole line is selected, the full line from the left to the right border was highlighted.  Now you have the option to highlight just the text.  This matches the behavior of other editors such as VS Code.</p> <p>This is how it looks:</p> <a href="https://drive.google.com/uc?id=1cWUzsmBFXSWfyQUPEptd6W-MjczS8dE4"><img title="partial" style="margin-right: auto; margin-left: auto; float: none; display: block; background-image: none;" border="0" alt="partial" src="https://drive.google.com/uc?id=14nqNGYTPP7rIo0MwaIywEXpA2KHiF_ON" width="474" height="192" /></a> <p> </p> <p>The above options are controlled via Tools, Options, IDE Options, Editor, Selection Color:</p> <a href="https://drive.google.com/uc?id=1GpOALSJCd2nkoo5CTBqCWPYgTcDKcovX"><img title="Options" style="margin-right: auto; margin-left: auto; float: none; display: block; background-image: none;" border="0" alt="Options" src="https://drive.google.com/uc?id=1Q9Wp8OExNllCDr3J92KC-YpjqiKk-Z7Y" width="422" height="81" /></a> <p>To get the the old behavior, set Alpha to 1 and check FillWholeLines.  You can also change the selection colors.  In addition to picking a color from the drop-down list, you can also type a hexadecimal value (e.g. $3399FF)</p>PyScripterhttp://www.blogger.com/profile/01872810912511222321noreply@blogger.com0tag:blogger.com,1999:blog-7593719622919430748.post-39754231357749270642022-10-28T11:54:00.001-07:002022-10-28T11:54:39.527-07:00Feature preview: Better Unicode handling<p>In the forthcoming release of PyScripter, there are numerous editor improvements.  One are that has been revamped is the handling of Unicode, which is now on a par with the best editors around (e.g. VS Code, Scintilla, etc.).  More specically,  there are improvements in the handling of:</p> <ul> <li>Wide glyphs (e.g. Chinese characters)</li> <li>Surrogate pairs and combining characters</li> <li>emojis  (you can enter with the Windows key + .)</li> <li>Bi-directional text.</li> </ul> <p>The picture below demonstrates these improvements:</p> <a href="https://drive.google.com/uc?id=1DUmB3vBIiYEtuQsvRnaMw8KcaOwP4965"><img title="Unicode" style="margin-right: auto; margin-left: auto; float: none; display: block; background-image: none;" border="0" alt="Unicode" src="https://drive.google.com/uc?id=1pKixXYDz449bzafsajlZxZEeHuQlFlNL" width="512" height="260" /></a>PyScripterhttp://www.blogger.com/profile/01872810912511222321noreply@blogger.com0tag:blogger.com,1999:blog-7593719622919430748.post-32349076667832115162022-10-26T19:12:00.001-07:002022-10-26T19:12:10.646-07:00New feature: Track changes bar<p>The forthcoming version includes an editor enhancement, the Track Changes bar. It is feature “borrowed” from Visual Studio, and it helps you locate the changes introduced to an edited file.  The picture below showcases the feature:</p> <a href="https://drive.google.com/uc?id=1LGE57YFYKPK9KlnHmBqASee7vSErRof6"><img title="Track changes" style="margin-right: auto; margin-left: auto; float: none; display: block; background-image: none;" border="0" alt="Track changes" src="https://drive.google.com/uc?id=1hQsujkjN6-L_uXYJ47986LVGl_P6jxFL" width="338" height="75" /></a> <ul> <li>Changed lines are shown in yellow.</li> <li>Changed but saved lines show in green.</li> <li>Changed, saved, but later changed again lines are shown in orange.</li> <li>Finally if you undo a changed and saved line to its original form (before saving) it is shown in blue.</li> </ul> <p>The Track Changes bar is shown by default, but you can hide it or change the width and the colors via Tools, Options, IDE Options, Editor, Trach changes</p> <a href="https://drive.google.com/uc?id=1ylelXZDuEtc7KQUcF6uYg1tTcMX7YZgV"><img title="IDE Options" style="margin-right: auto; margin-left: auto; float: none; display: block; background-image: none;" border="0" alt="IDE Options" src="https://drive.google.com/uc?id=1spC2TupCYzAsebsaOvOmj9pO1pcVV9js" width="281" height="71" /></a>PyScripterhttp://www.blogger.com/profile/01872810912511222321noreply@blogger.com0tag:blogger.com,1999:blog-7593719622919430748.post-25124258720251549682022-10-26T16:27:00.001-07:002022-10-26T16:27:40.485-07:00Feature preview: Spell checking<p>A new version of PyScripter will be released soon.   Alongside python 11 support, it will include a number of enhancements and new features.  One of them is the implementation of the long-standing request for spell checking comments and strings.</p> <p>The  Edit menu and the editor context menu, include a sub-menu “Spelling”:</p> <a href="https://drive.google.com/uc?id=1edDy_hOsYJ0Z5SKLrL558xDnH-EbDFYE"><img title="Spelling" style="margin-right: auto; margin-left: auto; float: none; display: block; background-image: none;" border="0" alt="Spelling" src="https://drive.google.com/uc?id=1P44Qk8WNKN6ZzS5gdLRufpaF3xUyIWEG" width="261" height="122" /></a> <p> </p> <p>The options are self-explanatory.  You can spell-check the current word, line, selection or the entire file.</p> <p>There are some IDE Options which affect spelling:</p> <p><a href="https://drive.google.com/uc?id=1p1W8EG7LZHGv4YT5iVJp4ZcDB2gRASYI"><img title="IDE Options" style="margin-right: auto; margin-left: auto; float: none; display: block; background-image: none;" border="0" alt="IDE Options" src="https://drive.google.com/uc?id=1n-o_LJ7NkMj5N8fRi7lDWoFAxinkHbeZ" width="355" height="45" /></a></p> <p>These option are:</p> <ul> <li>The language code for the dictionary used,</li> <li>If Spell check as you type is checked then spell checking occurs as you type like in Word.  This can also be set from the editor context menu.</li> <li>“Spell check syntax tokens” is a comma separated list of syntax tokens that controls what parts of your code are spell checked.   By default this includes all strings and comments.</li> </ul> <p>When the speller finds an error it is decorated with a red squiggly line:</p> <a href="https://drive.google.com/uc?id=1FCcSKKPri7v5fVf3uzb3t92yzvAXbzl9"><img title="Spelling error" style="margin-right: auto; margin-left: auto; float: none; display: block; background-image: none;" border="0" alt="Spelling error" src="https://drive.google.com/uc?id=1QZ6PuCQRi7jmd_UhKZ8HL5v-dRFrw_2b" width="244" height="23" /></a> <p>With the cursor on a spelling error the spelling context menu changes to:</p> <a href="https://drive.google.com/uc?id=18PRv1WHiWcAsj97QA4fb7FxZ_T6ZMMA6"><img title="Suggestions" style="margin-right: auto; margin-left: auto; float: none; display: block; background-image: none;" border="0" alt="Suggestions" src="https://drive.google.com/uc?id=1AmhjGInrh2DEWpZyLMO2h_t-4Rp4wXz2" width="244" height="185" /></a> <p>On top of the menu you can see one or more suggestions.  Clicking on one of them replaces the error with the suggestion.  You can also add the error word to the dictionary, delete it, ignore the error once, or ignore the error for the whole document.</p> <h4>Dictionaries</h4> <p>This feature is using the standard windows spell checker available since Windows 8. You can get dictionaries for different languages using the Windows Language settings.</p>PyScripterhttp://www.blogger.com/profile/01872810912511222321noreply@blogger.com0tag:blogger.com,1999:blog-7593719622919430748.post-4180831590311004182021-10-22T09:22:00.001-07:002021-10-22T09:22:31.549-07:00Completion with python extension modules such as PyQt5 and Pandas<p>Code Completion in the editor when you are using python extension modules has always been hard, primarily because these are not implemented in python code but rather in a compiled language (typically C) and come as dynamic link libraries. PyScripter in the past the option to import such modules when code completion was requested and used introspection of the imported modules to provide code completion and general IntelliSense support.</p><p>With the implementation of the <a href="https://microsoft.github.io/language-server-protocol/">Language Server Protocol</a> and the inclusion of the <a href="https://github.com/davidhalter/jedi">Jedi</a> language server there is now a better option. The use of stubs described in <a href="https://www.python.org/dev/peps/pep-0484/">PEP 484</a>.</p><p>pip install PyQt5-stubs</p><p>You would use the pip external Tool for installing the stubs. Then restart the language server, using the command under the Tools menu and presto, you have near perfect code completion with PyQt5.</p><p>Many packages such as numpy come with their stubs included. For others you can in internet for stub support.</p><p>Another way to improve code completion is to add the package/module name to the list of “Special packages” in the IDE options under code completion. Jedi will load these modules and this in many cases can improve the speed and quality of code completion. This works well with the pandas library for example.</p><pre> </pre>PyScripterhttp://www.blogger.com/profile/01872810912511222321noreply@blogger.com0tag:blogger.com,1999:blog-7593719622919430748.post-44714333962856612742021-10-20T18:35:00.001-07:002021-10-20T18:35:43.021-07:00PyScripter v4.1.1 released<p>PyScripter v4.1.1 is now available at <a href="https://sourceforge.net/projects/pyscripter/files/PyScripter-v4.1/">Sourceforge</a>.  This is a hotfix release addressing a couple of critical issues with version 4.1.0 (error on shutdown and errors while editing large files).  See the earlier announcement about version 4.1.0 for information about new features and issues addressed in the v4.1 as compared to v4.0.</p>PyScripterhttp://www.blogger.com/profile/01872810912511222321noreply@blogger.com0tag:blogger.com,1999:blog-7593719622919430748.post-32850850146112509872021-10-17T17:18:00.001-07:002021-10-17T17:18:21.570-07:00PyScripter 4.1.0 released<p>PyScripter 4.1 is now available at <a href="https://sourceforge.net/projects/pyscripter/files/PyScripter-v4.1/">Sourceforge</a>..  As discussed in an <a href="http://pyscripter.blogspot.com/2021/09/pyscripter-and-language-server-protocol.html">earlier blog post</a>, the major new feature of this release is the implementation of the <a href="https://microsoft.github.io/language-server-protocol/">Language Server Protocol</a> (LSP).  Code IntelliSence is now provided by the widely used <a href="https://github.com/pappasam/jedi-language-server">Jedi Language Server</a>. Here follows a list of new features and bug fixes in this release:</p> <h3>New features:</h3> <ul> <li>Implementation of the Language Server Protocol</li> <li>Python language support provided by the Jedi language server</li> <li>Two new styles added Windows11_Light and Windows11_Dark</li> <li>Copy and paste code as html to Powerpoint and other applications</li> <li>Removed support for python 3.3-3.5</li> <li>Read-only indicator on tabs</li> <li>Added traditional Chinese translation</li> </ul> <h3>Issues Addressed:</h3> <ul> <li><a href="https://github.com/pyscripter/pyscripter/issues/939">#939</a>, <a href="https://github.com/pyscripter/pyscripter/issues/951">#951</a>, <a href="https://github.com/pyscripter/pyscripter/issues/1116">#1116</a>, <a href="https://github.com/pyscripter/pyscripter/issues/1118">#1118</a>, <a href="https://github.com/pyscripter/pyscripter/issues/1119">#1119</a>, <a href="https://github.com/pyscripter/pyscripter/issues/1122">#1122</a>, <a href="https://github.com/pyscripter/pyscripter/issues/1123">#1123</a>, <a href="https://github.com/pyscripter/pyscripter/issues/1125">#1125</a>, <a href="https://github.com/pyscripter/pyscripter/issues/1129">#1129</a>, <a href="https://github.com/pyscripter/pyscripter/issues/1133">#1133</a></li> <li><a href="https://github.com/pyscripter/pyscripter/issues/1136">#1136</a></li> </ul>PyScripterhttp://www.blogger.com/profile/01872810912511222321noreply@blogger.com0tag:blogger.com,1999:blog-7593719622919430748.post-49284398681712580022021-09-30T03:50:00.002-07:002021-09-30T07:54:24.413-07:00PyScripter 4.1 is coming<p>A new release 4.1 is round the corner. Beyond bug fixes, the major new feature of this release is the <a href="http://pyscripter.blogspot.com/2021/09/pyscripter-and-language-server-protocol.html">implementation of the Language Server protocol</a>.</p> <h3>Seeking feedback from early adopters</h3> <p>I would like to get volunteers to try the new version before it is released to the public. You can download a registry-free installation from this <a href="https://drive.google.com/file/d/1f7lIR2O0e6AYjYXFH6ZtwYVPEOMkOpd1/view?usp=sharing">link</a>. Just unzip the file and run PyScripter.exe. It will not interfere with installed versions of PyScripter. Please report issues at the <a href="https://github.com/pyscripter/pyscripter/issues">issue tracker</a> and provide feedback at the <a href="https://groups.google.com/g/pyscripter">support forum</a>.</p>PyScripterhttp://www.blogger.com/profile/01872810912511222321noreply@blogger.com0tag:blogger.com,1999:blog-7593719622919430748.post-61153894713914822412021-09-30T03:02:00.001-07:002021-09-30T03:02:26.507-07:00PyScripter and the Language Server Protocol<p>Modern programming editors and Integrated Development Environments (IDEs), help programmers to write better code efficiently, by providing features such as:</p> <ul> <li>Code completion</li> <li>Signature help (function parameters)</li> <li>Code explorer (hierarchical view of module symbols</li> <li>Code hints</li> <li>Find definition</li> <li>Find references</li> <li>… and more</li> </ul> <p>These features are collectively referred to as “<em><strong>Code IntelliSense</strong></em>”, a term coined by Microsoft. To provide such features editors and IDEs need to parse and analyze source code, while users are typing code.   PyScripter has been doing a fine job in providing Code IntelliSense to its users by using its own python source code parsing and analysis module.  However, keeping up with new python versions and the changes and new features they bring to the python grammar requires significant development resources.</p> <p>A recent trend has been to move the Code IntelliSense processing out of the editors and IDEs by using external <em><strong>Language Servers</strong></em>.  Microsoft has standardized the communication between IDEs and Language Servers by promoting the adoption of the <a href="https://microsoft.github.io/language-server-protocol/">Language Server Protocol</a> (LSP).  The LSP is now used by Microsoft’s Visual Studio and Visual Studio Code as well as by many commercial and free IDEs.  There are numerous <a href="https://microsoft.github.io/language-server-protocol/implementors/servers/">Language Server implementations</a> for many programming languages, including Python.</p> <p>The forthcoming version of PyScripter, in addition to the usual round of bug fixes, implements the Language Server Protocol and shifts the “Code IntelliSense” processing to external Language Servers.  It also bundles the python <a href="https://github.com/pappasam/jedi-language-server">Jedi Language Server</a>, based on the <a href="https://github.com/davidhalter/jedi">Jedi package</a>, that is used by many other IDEs.  Although this brings few visible improvements (everything should work as before) it brings a number of advantages:</p> <ul> <li>Improved stability since the source code parsing and analysis is carried out in external processes.</li> <li>Better quality of Code IntelliSense, since the Jedi Language Server is actively developed and supports the latest python feature.</li> <li>The default Language Server (Jedi) can be easily swapped for alternative python Language Servers.</li> <li>New features such as code diagnostics and refactoring can be easily added, since they are supported by the LSP. </li> <li>Development resources are freed and can be diverted to other improvements of PyScripter.</li> </ul>PyScripterhttp://www.blogger.com/profile/01872810912511222321noreply@blogger.com0