aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicholas Bishop <nicholasbishop@gmail.com>2015-07-04 23:45:08 -0400
committerNicholas Bishop <nicholasbishop@gmail.com>2015-07-04 23:45:08 -0400
commitf4c8471a5bface749f04aa1b80a0200e174849ad (patch)
treef581af95f7394363d5778e0024d7e70c4321f3a2
parentLicense comment (diff)
downloadxbright-f4c8471a5bface749f04aa1b80a0200e174849ad.tar.gz
xbright-f4c8471a5bface749f04aa1b80a0200e174849ad.tar.bz2
xbright-f4c8471a5bface749f04aa1b80a0200e174849ad.zip
Add main function
-rwxr-xr-xxsft.py13
1 files changed, 9 insertions, 4 deletions
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()
bgstack15