DIAdem Idea Exchange

cancel
Showing results for 
Search instead for 
Did you mean: 
JoshRew

Extend DIAdem's Python Autocomplete for user-specific to directories other than Site-Packages

Status: New

I would like a feature where you can add extra paths in DIAdem's Python implementation for user-specific Python library directories.

 

In Visual Studio Code you can edit the settings.json to add paths to:

  • python.analysis.extraPaths (for importing)
  • python.autoComplete.extraPaths (for autocompletion)

JoshRew_0-1642107684799.png

 

So stuff imported from "C:\Repositories\Python\MyLibraryOther\__init__.py" is directly visible on import alongside stuff in SitePackages:

JoshRew_1-1642107684803.png

 

I've been able to add further locations to the active DIAdem Python Path via to use programmatically:

import site
site.addsitedir('C:/Repositories/Python/')

 

With that, I can "use" the script contents from both "Other" and "Site-Packages" items:

JoshRew_2-1642107685010.png

 

But currently I can only "see" items located within the Site-Packages folder:

JoshRew_4-1642107684831.png

 

-Josh Rewerts