When Will .pyd IntelliPrompt Be Supported? + Custom Completion Example?

SyntaxEditor Python Language Add-on for WPF Forum

The latest build of this product (v25.1.1) was released 18 days ago, which was before this thread was created.
Posted 17 days ago by James - FunctionBay
Version: 25.1.1
Avatar

I'm using the Python language with SyntaxEditor, and I saw in the forum that support for IntelliPrompt on .pyd files (especially for packages like numpy) is on your TODO list. Is there any specific timeline or roadmap available for this feature?

Also, I understand that it's possible to override the PythonCompletionProvider to implement completion for runtime objects.
Could you provide an example of how to achieve this?

Thanks in advance!

Comments (1)

Posted 16 days ago by Actipro Software Support - Cleveland, OH, USA
Avatar

Hello,

While we have a TODO item to add support for .pyi (Python interface) files, .pyd files is not something we can support since those are native compiled libraries that we cannot read.

To customize the IntelliPrompt completion for Python, you could:

  • Make a CustomPythonCompletionProvider class that inherits PythonCompletionProvider.
  • Override the OnSessionOpening method and update the session.Items appropriately there. OnSessionOpening is called right after all our default logic executes to build up the session.Items collection.
    • The session.Context will have an IPythonContext instance you can examine.
    • If you also need resolver results, you can call the session.Context.Resolve() method to get an IResolverResultSet.
  • Replace the default completion provider with yours via a line like this:
language.RegisterService<PythonCompletionProvider>(new CustomPythonCompletionProvider());


Actipro Software Support

Add Comment

Please log in to a validated account to post comments.