<s> import pygtk <EOL> pygtk . require ( '<STR_LIT>' ) <EOL> import gtk <EOL> class ColorButtonExample : <EOL> def __init__ ( self ) : <EOL> window = gtk . Window ( ) <EOL> window . connect ( '<STR_LIT>' , lambda w : gtk . main_quit ( ) ) <EOL> hbox = gtk . HBox ( ) <EOL> window . add ( hbox ) <EOL> label = gtk . Label ( '<STR_LIT>' ) <EOL> hbox . pack_start ( label , False ) <EOL> colorbutton = gtk . ColorButton ( gtk . gdk . color_parse ( '<STR_LIT>' ) ) <EOL> colorbutton . set_use_alpha ( True ) <EOL> colorbutton . set_title ( '<STR_LIT>' ) <EOL> colorbutton . set_alpha ( <NUM_LIT> ) <EOL> colorbutton . connect ( '<STR_LIT>' , self . color_set_cb ) <EOL> hbox . pack_start ( colorbutton ) <EOL> window . show_all ( ) <EOL> return <EOL> def color_set_cb ( self , colorbutton ) : <EOL> color = colorbutton . get_color ( ) <EOL> alpha = colorbutton . get_alpha ( ) <EOL> print '<STR_LIT>' , color . red , color . green , color . blue , '<STR_LIT>' , alpha <EOL> return <EOL> def main ( ) : <EOL> gtk . main ( ) <EOL> if __name__ == '<STR_LIT:__main__>' : <EOL> cbe = ColorButtonExample ( ) <EOL> main ( ) </s>
