Yet another hotfix release, PyScripter 4.2.4 is now available at Sourceforge. A scaling issue in code completion is fixed. This only affected users whose primary monitor is high-DPI (scaling > 100%).
Wednesday, December 21, 2022
Thursday, December 15, 2022
PyScripter v4.2.4 released
PyScripter 4.2.4 is now available at Sourceforge. 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.
Tuesday, December 13, 2022
PyScripter v4.2.3 released
PyScripter 4.2.3 is now available at Sourceforge. It is a hotfix release that deals with a regression 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.
Wednesday, December 7, 2022
Format your python code using “black”
The python style guide PEP 8 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, “black” is rapidly becoming the standard.
It is very easy to integrate this module with PyScripter.
- First you need to install it using Tools, Tools, Install Packages with pip
- Then, use the menu commands Tools, Configure Tools, Add to add a new external tool
- Fill in the dialog box as indicated below
Set:
Name: Format Selection
Description: Format selected code using the “black” module
Command: $[PythonExe-Short]
Name: | Format Selection |
Description: | Format selected code using the “black” module |
Command: | $[PythonExe-Short] |
Parameters: | -m black - |
Shortcut: | Shift+Alt+F |
Context: | Selection Available |
Std. Input: | Selection |
Std. Ouput | Selection |
Also check “Hide console” and “UTF8 IO” and press OK.
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.
This tool definition is available with release 4.2.2 in new installations, but you need to add it manually to existing installations.
PyScripter v4.2.2 released
PyScripter 4.2.2 is now available at Sourceforge. It is hotfix release that has quietly replaced earlier 4.2 versions. It fixes a number of reported issues, but also includes new features.
New features:
- The dated Internet Explorer replaced with the Edge browser
- Added Format Selection external tool using the "black" module
- New IDE option 'Automatic Restart' (#1188)
- Recovery of unsaved files on system shutdown or application crash
- New IDE command "Zoom Reset" Atl+Num 0 (#650)
- Two new styles added: Windows 11 Polar Dark and Windows 11 Polar Light
Issues addressed:
Wednesday, November 9, 2022
PyScripter 4.2.1 released
PyScripter 4.2.1 is now available at Sourceforge. It is hotfix release that has quietly replaced version 4.2.0. It fixes a couple of reported issues:
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".
Sunday, November 6, 2022
Context sensitive help
One of the useful features of PyScripter has been the integration with the python help file. For instance if you type in the editor
for i in range(100):
then place the cursor inside “range”and press F1, you get help on the “range” python object.
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.
You can get the python 11 HTML Help file from this link. 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.
PyScripter 4.2.0 released
PyScripter 4.2 is now available at Sourceforge. This release provides support for python 11 as well as many new features, enhancements and bug fixes:
New features:
- Python 3.11 support added - Support for python 3.6 removed
- Spell checking of comments and strings #84
- Track changes bar as in Visual Studio
- Editor Unicode handling improvements (emojis, bi-directional text, etc.)
- Editor selection options (alpha blending, fill whole lines)
- Portuguese translations (pt_PT, pt_BR) added
Issues addressed:
Friday, October 28, 2022
New feature preview: Selection color options
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.
Selection in previous versions:
Current default selection painting (alpha blending):
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.
This is how it looks:
The above options are controlled via Tools, Options, IDE Options, Editor, Selection Color:
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)
Feature preview: Better Unicode handling
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:
- Wide glyphs (e.g. Chinese characters)
- Surrogate pairs and combining characters
- emojis (you can enter with the Windows key + .)
- Bi-directional text.
The picture below demonstrates these improvements:
Wednesday, October 26, 2022
New feature: Track changes bar
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:
- Changed lines are shown in yellow.
- Changed but saved lines show in green.
- Changed, saved, but later changed again lines are shown in orange.
- Finally if you undo a changed and saved line to its original form (before saving) it is shown in blue.
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
Feature preview: Spell checking
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.
The Edit menu and the editor context menu, include a sub-menu “Spelling”:
The options are self-explanatory. You can spell-check the current word, line, selection or the entire file.
There are some IDE Options which affect spelling:
These option are:
- The language code for the dictionary used,
- 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.
- “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.
When the speller finds an error it is decorated with a red squiggly line:
With the cursor on a spelling error the spelling context menu changes to:
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.
Dictionaries
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.