Cleanup: removal of mer, making things cleaner, etc
[quicknote] / src / quicknote.py
index 0848b53..1dcc853 100755 (executable)
@@ -8,17 +8,31 @@ it under the terms of the GNU General Public License version 2 as
 published by the Free Software Foundation.
 """
 
-
+import os
 import sys
-sys.path.append('/usr/lib/quicknote')
-
-import locale
+import logging
 import gettext
+
+_moduleLogger = logging.getLogger(__name__)
 gettext.install('quicknote', unicode = 1)
+sys.path.append('/usr/lib/quicknote')
+
 
-import libquicknote
+import constants
+import quicknote_gtk
 
 
 if __name__ == "__main__":
-       app = libquicknote.QuicknoteProgram()
-       app.main()
+       try:
+               os.makedirs(constants._data_path_)
+       except OSError, e:
+               if e.errno != 17:
+                       raise
+
+       logging.basicConfig(level=logging.DEBUG, filename=constants._user_logpath_)
+       _moduleLogger.info("quicknote %s-%s" % (constants.__version__, constants.__build__))
+       _moduleLogger.info("OS: %s" % (os.uname()[0], ))
+       _moduleLogger.info("Kernel: %s (%s) for %s" % os.uname()[2:])
+       _moduleLogger.info("Hostname: %s" % os.uname()[1])
+
+       quicknote_gtk.run_quicknote()