Tuesday, September 16, 2025

Feature preview: File-system project folders

The next version of PyScripter will add file-system project folders, a much requested feature.  In PyScripter Project Explorer you will be able to use two types of file folders:

  • Virtual folders:  These folders allow you to organize your project files in a logical manner. For example you can have a folder for source files, another one for documentation files and another one for configuration files. These folders are just collections of files and not necessarily correspond to physical folders on disk. They may contain subfolders. You can create virtual folders using the Add commands of the folder context menu.  This is what we currently have in PyScripter.
  • File-system folders:  These folders mirror the directory structure on disk. Their content reflects the content of the physical folders and they are auto-updating when the contents of the folders on disk change, e.g. when files are added, deleted or renamed. They are created using the Import Directory folder context menu. They may also contain subfolders.

The Project Explorer uses different icons to distinguish between these two types of folder nodes. For example in the picture below, "Doc" is a virtual folder and "rpyc" a file-system one.


The updated "Import Directory" dialog box



This dialog box is accessible from the folder context menu. It allows you to import a directory into the project. In the file masks field, you can provide one or more masks separated by semi-colon that determines which file types will be imported into the project. If "Recursive" is checked subfolders will be imported too. If "Auto-update" is checked then a file-system folder will be created that will automatically refresh, whenever a change in the specified directory takes place. Otherwise, a virtual folder will be created. Finally, you have the option to add the specified directory to the project's "Extra Python Path", so that the python interpreter can find and import modules in this directory.

Wednesday, May 21, 2025

Turning your python script into an executable the easy way

 Sometimes you may want to convert your python script into a self-contained executable.   The best tool for this job is PyInstaller,  The PyScripter External Tools can simplify the process.

First you need to install PyInstaller, using the menu Tools, Tools, Install packages with pip:


Then you need to create an External Tool that uses PyInstaller to convert the active script into an executable.   Use the menu Tools, Configure Tools... and then press Add.   Configure the external tools as shown below:


With the above, all it takes to convert your script into an executable is to invoke the menu Tools, Tools, Create executable. Your executable can then be found in a subfolder of your script's folder called "dist".

If you want to learn more about external tools, consult the help file using Help, PyScripter, External Tools and Help, PyScripter, Parameters.

Saturday, May 10, 2025

PyScripter v5.2.3 released

PyScripter v5.2.3 is now available at Sourceforge. This is mainly a bug fix release.

Sunday, April 13, 2025

PyScripter v5.2.2 released

PyScripter v5.2.2 is now available at Sourceforge. The main new feature is the support for Grok 3, which is one of the best Large Language Models available.  The reasoning variant (grok-3-mini) is also supported.

  • New features:
    • Support for Grok LLM
    • New editor commands Next/Previous change (Shft+Ctrl+Num+/-)
    • IDE option to enable/disable editor accessibility support
  • Issues addressed:

Thursday, February 27, 2025

Using QGIS - Update

 QGIS is a widely used, free and open source, GIS software package.  This is an update on how to use it with PyScripter.   I have used the currently latest version for Windows (3.42) but you can adapt the instructions to other recent versions of QGIS.

Create a command file "PyScripter-QGIS.cmd" with the following content:

@echo off
rem Adapt the following line to match your installation
set QGIS_ROOT=C:\Program Files\QGIS 3.42.0
call "%QGIS_ROOT%\bin\o4w_env.bat"
path %OSGEO4W_ROOT%\apps\qgis\bin;%PATH%
@echo on
rem Set VSI cache to be used as buffer, see #6448
set VSI_CACHE=TRUE
set VSI_CACHE_SIZE=1000000
set GDAL_FILENAME_IS_UTF8=YES
set QT_PLUGIN_PATH=%OSGEO4W_ROOT%\apps\qgis\qtplugins;%OSGEO4W_ROOT%\apps\qt5\plugins
set PYTHONPATH=%QGIS_ROOT%\apps\qgis\python;%PYTHONPATH%
pushd "c:\Program Files\PyScripter"
rem Adapt the following line to match the python version that comes with QGIS
start "PyScripter" /B "PyScripter.exe" --PYTHON312 --PYTHONDLLPATH="%QGIS_ROOT%\apps\Python312"
popd

Save it anywhere you want and run it. 

Then in the PyScripter python interpreter you can do:

*** Python 3.12.9 (main, Feb  7 2025, 14:34:44) [MSC v.1938 64 bit (AMD64)] on win32. ***
*** Remote Python engine is active ***
>>> from qgis.core import *
>>> import qgis.utils
>>> from PyQt5.QtCore import QSettings
>>> 

That's it.

Sunday, February 9, 2025

PyScripter v5.2.1 released

PyScripter v5.2.1 is now available at Sourceforge.  This release brings a number of significant improvements in the areas of LLM-Assisted coding and Debugging.   This is the list of the main new features and fixes:

  • New Features:
    • LLM Support improvements
      • Added support for DeepSeek LLM
      • Added support for DeepSeek and OpenAI "o" LLM reasoning models
      • Improved display of LLM output
      • Syntax Highligting for 300 languges
      • Exposed the temperature LLM parameter
      • Printing of LLM output
    • Debugging
    • Surround editor selection with brackets and quotes
    • Added two new styles: Windows11 MineShaft (new default) and Windows 11 Impressive Light
  • Issues addressed:

DeepSeek and Other improvements to LLM-Assisted Coding

 The forthcoming version of PyScripter has a number of improvements to LLL-assisted coding:

 When it comes to coding, DeepSeek is simply amazing.  It is now supported both in the Chat and Assistant.

  • The rendering of the LLM responses is much improved and it is now on a par with the Web interface of the LLM providers.

Code is presented in code boxes, and using the icons in the header, you can copy the code into the clipboard or directly into a new editor.

Markdown is now rendered perfectly:


  • Support for DeepSeek and OpenAI LLM reasoning models

You can now follow the reasoning behind the answers, using DeepSeek's deepseek-reasoner model or OpenAI's "o" models, such o1-mini.  The reasoning is presented without cluttering the output.


 

  • Other improvements  

  • The temperature LLM model parameter is exposed by the Chat UI.   It is a decimal number between 0 and 2 that controls the randomness of the results (higher values leed to more random answers).
  • You can now print the chat topic content. 
  • Syntax highlighting for about 300 programming languages is available.  So you can now ask questions not just about python but also for other languages.

 And don't forget the Assistant.  While coding Assistant completion is available by pressing Ctrl+Alt+Space. as well as by using the editor context menu.