Specifying user files instead of search paths in project

SyntaxEditor Python Language Add-on for WPF Forum

Posted 5 months ago by Tobias Lingemann - Software Devolpment Engineer, Vector Informatik GmbH
Version: 21.1.0
Avatar

Hi,

we are just starting to use the python add-on. To show the content from other files, I have to specify the parent directory of each file as a search path.
This seems a little counter-intuitive. Is there a way to simply add and remove files from the project?

The IProject interface has a collection of active modules, but this requires a compilation unit. I am looking for something similiar to the LoadForFile() method in the C# add-on (DotNetProjectResolver.SourceProjectContent).


Best regards, Tobias Lingemann.

Comments (2)

Posted 5 months ago by Actipro Software Support - Cleveland, OH, USA
Avatar

Hi Tobias,

The search paths only require that you specify the root path of each folder structure.  When you do so, it will traverse into sub-folders to look for packages and modules.

Unfortunately there isn't anything to load a single file since the contextual location of the module within its folder structure is required to determine the package.


Actipro Software Support

Posted 5 months ago by Tobias Lingemann - Software Devolpment Engineer, Vector Informatik GmbH
Avatar

I guess I still have to figure out how Python works. Creating empty files with the name "__init__.py" along the way, solves the problem.


Best regards, Tobias Lingemann.

The latest build of this product (v21.1.3) was released 20 days ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.