V Fri, 6 Oct 2017 07:29:28 -0600
David Mulder
Hi, few notes:
1. whole UI related stuff should be done using common import + UI.call as it is already attached to component system and it is not written in ruby. What is this common import and UI.call? I don't follow.
Problem is that you do not use Yast component system. In general all yast modules is attached to component system and you can call it with it. Old python bindings implement it properly with https://github.com/yast/yast-python-bindings/blob/master/src/YCP.cc which adds to python ability to call rest of component system. import is finding module like https://github.com/yast/yast-python-bindings/blob/master/src/YCP.cc#L107 and call it with https://github.com/yast/yast-python-bindings/blob/master/src/YCP.cc#L1238 so to call UI methods you need to import module "UI" and then with that call use method you want from UI namespace.
2. yast.py is basically reimplementation of yast stuff in python. I am not sure if it is right way, as anything you will need you have to reimplement
Yes, the yast.py code is wrong. I'm trying to think of a good way to use the ruby Wizard code, etc. You mention there is a way to be able to call functions between yast modules?
yes, as I describe above.
3. your modules is not possible to call from rest of YaST. For ycp, perl and ruby it is possible to call it from each other.
So in short. Your approach is more like wrapper for c++ parts ( currently only UI ) and rewrite for rest.
In general if you need only UI from YaST, then I suggest to use direct approach and use libyui python bindings - https://github.com/libyui/libyui-bindings . But as I said this approach prevent you to use any part written in ruby and also rest of YaST cannot call your methods.
It miss some layer from ycp-ui-bindings, but provide all needed to build UI.
Josef
-- To unsubscribe, e-mail: yast-devel+unsubscribe@opensuse.org To contact the owner, e-mail: yast-devel+owner@opensuse.org