Friday, October 22, 2021

Completion with python extension modules such as PyQt5 and Pandas

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.

With the implementation of the Language Server Protocol and the inclusion of the Jedi language server there is now a better option. The use of stubs described in PEP 484.

pip install PyQt5-stubs

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.

Many packages such as numpy come with their stubs included.  For others you can in internet for stub support.

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.

 

Wednesday, October 20, 2021

PyScripter v4.1.1 released

PyScripter v4.1.1 is now available at Sourceforge.  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.

Sunday, October 17, 2021

PyScripter 4.1.0 released

PyScripter 4.1 is now available at Sourceforge..  As discussed in an earlier blog post, the major new feature of this release is the implementation of the Language Server Protocol (LSP).  Code IntelliSence is now provided by the widely used Jedi Language Server. Here follows a list of new features and bug fixes in this release:

New features:

  • Implementation of the Language Server Protocol
  • Python language support provided by the Jedi language server
  • Two new styles added Windows11_Light and Windows11_Dark
  • Copy and paste code as html to Powerpoint and other applications
  • Removed support for python 3.3-3.5
  • Read-only indicator on tabs
  • Added traditional Chinese translation

Issues Addressed: