From f4c8471a5bface749f04aa1b80a0200e174849ad Mon Sep 17 00:00:00 2001 From: Nicholas Bishop Date: Sat, 4 Jul 2015 23:45:08 -0400 Subject: Add main function --- xsft.py | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'xsft.py') diff --git a/xsft.py b/xsft.py index 9852893..3f175a5 100755 --- a/xsft.py +++ b/xsft.py @@ -109,7 +109,12 @@ class MyWindow(Gtk.Window): temperature_to_gamma(self.temperature.get_value())) -win = MyWindow() -win.connect("delete-event", Gtk.main_quit) -win.show_all() -Gtk.main() +def main(): + win = MyWindow() + win.connect("delete-event", Gtk.main_quit) + win.show_all() + Gtk.main() + + +if __name__ == '__main__': + main() -- cgit