0

The Walabot API tells me to

from imp import load_source
WalabotAPI = load_source('WalabotAPI','/usr/share/walabot/python/WalabotAPI.py')

but the KDevelop IDE (version 5.1.0) doesn't index the module, so it's code auto-complete and navigation won't work for WalabotAPI.

How can I make KDevelop tell to index the file; or alternatively, import the python module in a way that the KDevelop indexer understands?

Laurenz
  • 1,810
  • 12
  • 25

1 Answers1

1

You should place WalabotAPI.py somewhere in the module search path, or simply in your source tree, and do a normal import WalabotAPI.

KDevelop never* cares about the value of anything - '/usr/share/walabot/python/WalabotAPI.py' is just "a string" - so this method of loading modules is unlikely to be supported anytime soon.

*except when subscripting tuples with an integer literal, which is common and useful enough to get special-cased.

FLHerne
  • 267
  • 2
  • 5