trik-studio icon indicating copy to clipboard operation
trik-studio copied to clipboard

Make `brick`, `script`, etc a proper modules in python instead of objects

Open DCNick3 opened this issue 4 years ago • 1 comments

Making exported trik functionality to modules is more "in spirit" of python (this is how ghidra and IDA Pro integrated python into their projects, for example). Furthermore, it will allow one to set up code completion for trik objects in python IDEs by creating stub files for those modules. There is no such a possibility with trik APIs being objects in the global namespace.

I propose to put trik-specific functionality into trik module, as a further improvement of code structure. Also, one would be able to write from trik import * to introduce all those modules into a global scope (even though it's not recommended by python community, as it reduces code maintainability).

DCNick3 avatar Jun 15 '20 16:06 DCNick3

It seems to be connected with this https://github.com/trikset/trikRuntime/pull/577

khodand avatar Jul 27 '21 19:07 khodand