Improve Python test program
[projects/chimara/chimara.git] / tests / testpeas.py
1 import os.path
2 from gi.repository import Gtk, Peas, PeasGtk, Chimara
3 c = Chimara.Glk()
4
5 e = Peas.Engine.get_default()
6 e.add_search_path(os.path.expanduser('~/gtk/inst/lib/chimara'),
7         os.path.expanduser('~/gtk/inst/lib/chimara/plugins'))
8
9 frotz_info = e.get_plugin_info('frotz')
10 e.load_plugin(frotz_info)
11
12 w = Gtk.Window()
13 m = PeasGtk.PluginManager(e)
14 m.get_view().set_selected_plugin(frotz_info)
15 w.add(m)
16 w.connect('destroy', Gtk.main_quit)
17 w.show_all()
18
19 Gtk.main()