import gtk

from kiwi.ui.widgets.entry import Entry

entry = Entry()
entry.set_completion_strings(['apa', 'apapa', 'apbla',
                              'apppa', 'aaspa'])

win = gtk.Window()
win.connect('delete-event', gtk.main_quit)
win.add(entry)
win.show_all()

gtk.main()

# encoding: iso-8859-1
import gtk

from kiwi.ui.widgets.entry import Entry

def on_entry_activate(entry):
    print 'You selected:', entry.get_text().encode('latin1')
    gtk.main_quit()

entry = Entry()
entry.connect('activate', on_entry_activate)
entry.set_completion_strings(['Belo Horizonte',
                              u'So Carlos',
                              u'So Paulo',
                              u'Bstad',
                              u'rnskldsvik',
                              'sanca',
                              'sampa'])

win = gtk.Window()
win.connect('delete-event', gtk.main_quit)
win.add(entry)
win.show_all()

gtk.main()

Extend example to include non-ASCII characters
Extend example to include non-ASCII characters
