[yast-devel] Question about Python and Ruby bindings
Hi all, First off, let me apologize if my questions have already been covered. I searched the archives and Googled for answers, but didn't come up with much. I am developing the YaST education module as part of the Google Summer of Code. I am interested in using the Python bindings, and currently have yast2-python-bindings-2.17.3-1.41 installed on openSUSE 11.1. I created a template using the config-python skeleton, but when I do a make/make install and then try to run my module, I get an error that no such client module is found in the search path (/y2update/clients, /root/.yast2/clients, /usr/share/YaST2/clients). I assume that the problem lies in the fact that a .py file has been installed in /usr/share/YaST2/clients instead of a .ycp file. Do I need to create a .ycp wrapper to load my Python module, or what is the "standard" way? Second question, out of interest. I see that Ruby bindings exist for YaST, but haven't seen much documentation on them except for a few blog posts from 2007. Are the Ruby bindings production ready, or still considered unstable? If these questions are in the wrong list, please direct me to the right place. Thanks all. Regards, Jeff Shantz -- To unsubscribe, e-mail: yast-devel+unsubscribe@opensuse.org For additional commands, e-mail: yast-devel+help@opensuse.org
Jeff Shantz wrote:
Second question, out of interest. I see that Ruby bindings exist for YaST, but haven't seen much documentation on them except for a few blog posts from 2007. Are the Ruby bindings production ready, or still considered unstable?
There are examples in the source tree. They are not complete though. I did not want just to make "wrappers" and I was looking for a good concept to make the UI part more "rubyst", specially after Stefan Hundhammer splitted libyui out, there was an opportunity to use libyui without the ycp bindings, but I never got to finish that. However, Klaus has been testing them as a solution to access the ycp module APIs from rails, with good results. -- Duncan Mac-Vicar P. - Engineering Manager, YaST SUSE LINUX Products GmbH, GF: Markus Rex, HRB 16746 (AG Nuernberg) -- To unsubscribe, e-mail: yast-devel+unsubscribe@opensuse.org For additional commands, e-mail: yast-devel+help@opensuse.org
On Thu, May 28, 2009 at 12:51:05PM -0400, Jeff Shantz wrote:
Hi all,
First off, let me apologize if my questions have already been covered. I searched the archives and Googled for answers, but didn't come up with much.
No problem, and I am sorry for the delayed reply.
I am developing the YaST education module as part of the Google Summer of Code. I am interested in using the Python bindings, and currently have yast2-python-bindings-2.17.3-1.41 installed on openSUSE 11.1. I created a template using the config-python skeleton, but when I do a make/make install and then try to run my module, I get an error that no such client module is found in the search path (/y2update/clients, /root/.yast2/clients, /usr/share/YaST2/clients). I assume that the problem lies in the fact that a .py file has been installed in /usr/share/YaST2/clients instead of a .ycp file. Do I need to create a .ycp wrapper to load my Python module, or what is the "standard" way?
Yes, the python code has to be a YaST module and you have to create a YCP client wrapper to call it. See the attached files. It looks like the skeleton has some bugs. It might be easier to sort out things on IRC, if it works out across the timezones. Meet us on irc://irc.opensuse.org/yast . For others' reference, here is Jeff's blog about the project: http://www.jeffshantz.com/?cat=3 -- Martin Vidner, YaST developer http://en.opensuse.org/User:Mvidner Kuracke oddeleni v restauraci je jako fekalni oddeleni v bazenu
On Tue, Jun 2, 2009 at 6:22 AM, Martin Vidner<mvidner@suse.cz> wrote:
Yes, the python code has to be a YaST module and you have to create a YCP client wrapper to call it. See the attached files. It looks like the skeleton has some bugs.
Thanks Martin (and sorry for my delayed response). Got it figured out and everything is going smoothly now. If I have some time at the end of the summer, I'd like to volunteer to expand the documentation/tutorials on the Python bindings. Now that I have everything up and running, they are a real pleasure to work with. :) Jeff -- To unsubscribe, e-mail: yast-devel+unsubscribe@opensuse.org For additional commands, e-mail: yast-devel+help@opensuse.org
participants (3)
-
Duncan Mac-Vicar Prett
-
Jeff Shantz
-
Martin Vidner