Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

As in topic, how can I select or deselect radio buttons in python. The application is made by quickly.

any help pleas ?

share|improve this question
up vote 1 down vote accepted

Like checkboxes, radio buttons also inherit from Gtk.ToggleButton, so you can use the set_active() method to set the status of a radio button. This action causes the “toggled” signal to be emitted.

For example, if we have 3 radio buttons called radio1, radio2, and radio3 in a group, by default the first one in the group would be selected. If we want to select another one, for example, radio3 instead, we should use:



share|improve this answer
That's exactly what I was looking for. Thanks for your help! – Majster-pl Jul 28 '12 at 18:13

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.