Autocompletion in PythonScrips for external libraries

Forum Forums Visual Components 4.1 Python Programming in VC Autocompletion in PythonScrips for external libraries

This topic contains 2 replies, has 2 voices, and was last updated by JuergenB JuergenB 4 months, 3 weeks ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #15018
    JuergenB
    JuergenB
    Participant

    Hi,

    is it possible to have autocompletion in the VC Python Scripts for external libraries (os, io, pypyodbc, etc.). This would improve the workflow a lot!

    Another nice feature would be a shortcut to go to the function definition (as in Visual Studio -> F12). Is there something like that?

    Thanks in advance for your help!

    #15059
    Avatar
    jouha
    Moderator

    Hi,

    Auto-completion gets definitions from “My Templates”, e.g.

    C:\Users\%username%\Documents\Visual Components\4.1\My Templates\Python Editor\Auto Complete

    You have provide the definitions to those xmls if you like to have more.

    Unfortunately, I believe there’s no other way.

    #15129
    JuergenB
    JuergenB
    Participant

    @jouha Thank you for your help. I tried to provide an xml for VC, but I could not figure out how to provide it. I tried to add it in the API xml, but this one is generated each time VC is started. I also tried to add an xml with the structure as the API used for the vcScript, but it did not work. Is there a documentation on how to provide the xml?

    I created a simple python example “myLib.py”. It would be very nice if you could create the required xml and share it. (if you have a better example, I am even happier)

    In general: It’s unfortunate, that auto-completion is not automatically provided for external libraries. This feature would be very handy!
    I see myself preparing an xml for my own libraries, but it’s not worth the effort to provide it for other libraries (os, io, …) “by hand” or with a self written tool.

    Thank you in advance for your help!

    Attachments:
    You must be logged in to view attached files.
    #15287
    JuergenB
    JuergenB
    Participant

    I contacted the support and unfortunately Vivek told me:

    “Unfortunately, you cannot extend any external python modules with our API for auto completion.”

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.