Module does not seem to be imported competely

SyntaxEditor Python Language Add-on for WPF Forum

The latest build of this product (v21.1.1) was released 3 months ago, which was before this thread was created.
Posted 19 days ago by Volodymyr Tsymbalistyi
Version: 21.1.1
Platform: .NET 4.8
Environment: Windows 10 (64-bit)

I am trying to evaluate Python Syntax editor.

I imported numpy but intellisense does not seem to recognise that there is sqrt function there.

Am I doing something wrong? Or does it have some kind of limitation I am not aware of. All it shows starting from "s" is "setup".

I am using Python 3. I added <pythonfolder>\Lib\site-packages search path to my project.


[Modified 19 days ago]

Comments (6)

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


After digging into it, I believe what's happening here is that the "sqrt" function is defined in the "_multiarray_umath.xx.pyd" file.  Since it's a .pyd file and not a .py file, we are unable to read it to get reflection data for IntelliPrompt.

Actipro Software Support

Posted 18 days ago by Volodymyr Tsymbalistyi

So is there a way for me to utilise bytecode python files?

[Modified 18 days ago]

Posted 18 days ago by Volodymyr Tsymbalistyi

I just created a custom py file and it fails to autocomplete anything except module name as well.

All it contains is:

def user_function():
    return 2
Posted 18 days ago by Actipro Software Support - Cleveland, OH, USA


We are unaware of how to get any reflection data on ".pyd" files at this time.  If you locate any specification on how to read those files from C#, please let us know.  Thus at the current time, we can only load ".py" files for reflection.

For your second comment, please tell us the exact steps to reproduce the issue (project search paths, file names, etc.) so we can try it here.  If the module is imported properly, you should be able to see "user_function".

Actipro Software Support

Posted 14 days ago by Volodymyr Tsymbalistyi


Regarding pyd consumption should help you.

I added syntax editor to the window. Added containing path as well as py file itself to project.SearchPaths in window constructor. I can see Sample in a list of imports. But if I "import Sample", i do not see anything in automplete when i try "Sample.".

Please let me know how can I debug this to give you more context. I also tried subscribing to project.Resolver.UnknownReturnTypeReferenceCallback but it did not trigger even once no matter what I did.


[Modified 14 days ago]

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


We haven't used that library before.  Can you put together a simple C# project that shows how to load a particular .pyd file like one of the numpy ones and then enumerate all the modules, functions, etc. within it with enough information to display in IntelliPrompt?  Please remove the project's bin/obj folders from the .zip you send to our support address, and mention this thread in your e-mail.  Thanks!

In regards to, if I make a file, add your two lines you mentioned in an earlier reply in this thread, add the folder path containing as to the project.SearchPaths, I get IntelliPrompt for "Sample" after the import keyword.  I also get auto-complete for "user_function" after "Sample." like here:

import Sample

You should not add a .py file's path to the project.SearchPaths, but you can add it's containing folder as a path.

If you still aren't seeing what I described working, please make sure you followed all the steps in the add-on's Getting Started topic.

Actipro Software Support

Add Comment

Please log in to a validated account to post comments.