I am writting a PyGTK application. I am using the glade interface designer for layouts.
I want to know if there is any standard way of naming a Widget object.
eg : For a button called "Configure" how should I name it ? eg : ConfigureBt, ButtonConfigure, ConfigureButton, etc
I want the app to be accepted in the default ubuntu/debian/gnome setup. I want to follow all 开发者_运维知识库the standards requirements for it.
There's no "official" standard, but you'll save yourself headaches if you use lowercase, underscore separated names (eg. refresh_button
). That way, signal handlers can be called eg. refresh_button_clicked
, and Glade can automatically connect to them. Then it will match up nicely with Python coding standards.
精彩评论