[Thuban-commits] r2776 - trunk/thuban

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Sat Jun 23 01:06:26 CEST 2007


Author: bernhard
Date: 2007-06-23 01:06:26 +0200 (Sat, 23 Jun 2007)
New Revision: 2776

Modified:
   trunk/thuban/ChangeLog
   trunk/thuban/thuban.py
Log:
Added the __name__="__main__" trick so you can
import thuban without starting the application directly.
This makes debugging possible.


Modified: trunk/thuban/ChangeLog
===================================================================
--- trunk/thuban/ChangeLog	2007-06-22 22:26:33 UTC (rev 2775)
+++ trunk/thuban/ChangeLog	2007-06-22 23:06:26 UTC (rev 2776)
@@ -1,5 +1,12 @@
 2007-06-23  Bernhard Reiter <bernhard at intevation.de>
+	
+	* thuban.py: Added the __name__="__main__" trick so you can
+	import thuban without starting the application directly.
+	This makes debugging possible.
 
+
+2007-06-23  Bernhard Reiter <bernhard at intevation.de>
+
 	* Thuban/version.py: Enable to indicate branch names in the 
 	thuban_release-svn-display.
 

Modified: trunk/thuban/thuban.py
===================================================================
--- trunk/thuban/thuban.py	2007-06-22 22:26:33 UTC (rev 2775)
+++ trunk/thuban/thuban.py	2007-06-22 23:06:26 UTC (rev 2776)
@@ -30,8 +30,7 @@
         print "Please update your PATH environment variable to include %s\\gdal\\bin" % thubandir
 
 import Thuban.UI.main
-    
-# Start Thuban
-Thuban.UI.main.main()
 
-
+# Start Thuban
+if __name__ == "__main__":
+    Thuban.UI.main.main()



More information about the Thuban-commits mailing list