Is there any way I can auto-complete when using a remote API with Python?

Typically: "How do I... ", "How can I... " questions
Post Reply
wdy
Posts: 6
Joined: 14 Oct 2024, 03:12

Is there any way I can auto-complete when using a remote API with Python?

Post by wdy »

I find that when using Python through ZMQRomoteAPI, it will not automatic complete the function I can use, like sim.Get... I can not see what functions are there, which means I need to remember all the functions in the usermanual. It is really a huge work, any way to simplify this work?
coppelia
Site Admin
Posts: 10745
Joined: 14 Dec 2012, 00:25

Re: Is there any way I can auto-complete when using a remote API with Python?

Post by coppelia »

Hello,

this depends on what IDE you are using. In general you can create any auto-completion / API highligthing with sim.getApiFunc and sim.getApiInfo. Have a look at the demo add-on in addOns/Notepad++ autocompletion.lua

Cheers
wdy
Posts: 6
Joined: 14 Oct 2024, 03:12

Re: Is there any way I can auto-complete when using a remote API with Python?

Post by wdy »

coppelia wrote: 28 May 2025, 09:39 Hello,

this depends on what IDE you are using. In general you can create any auto-completion / API highligthing with sim.getApiFunc and sim.getApiInfo. Have a look at the demo add-on in addOns/Notepad++ autocompletion.lua

Cheers
Thanks for your reply, it is useful!
wdy
Posts: 6
Joined: 14 Oct 2024, 03:12

Re: Is there any way I can auto-complete when using a remote API with Python?

Post by wdy »

coppelia wrote: 28 May 2025, 09:39 Hello,

this depends on what IDE you are using. In general you can create any auto-completion / API highligthing with sim.getApiFunc and sim.getApiInfo. Have a look at the demo add-on in addOns/Notepad++ autocompletion.lua

Cheers
Now I am using VsCode to control CoppeliaSim remotely(using python), I installed the coppeliasim_zmqremoteapi_client with pip. But I can not auto-complete, is there any way to simplify programing. Also I have looked up the Addons/Notepad++ autocompletion.lua, but it seems the script only works for windows system,because when I loaded the script, the console showed " 1. Place 'lua.xml' into 'C:/Programs (x86)/Notepad++/plugins/APIs' (or similar)
[Exporters >> Notepad++ autocompletion@addOnScript:info] 2. Place 'langs.xml' into 'C:/user/<userName>/AppData/Roaming/Notepad++' (or similar).
[Exporters >> Notepad++ autocompletion@addOnScript:info] Alternatively, you may also only replace the Lua section in the original langs.xml file.". What to do if I am using Linux?Thanks!
coppelia
Site Admin
Posts: 10745
Joined: 14 Dec 2012, 00:25

Re: Is there any way I can auto-complete when using a remote API with Python?

Post by coppelia »

It really depends on your IDE you are using. The mentioned add-on is an example for Notepad++. For other IDEs you will have to look at a different way to generate relevant files.

Cheers
Post Reply