The mess of things to get this to work for Fremantle
[quicknote] / src / quicknote.py
index 0848b53..10b6149 100755 (executable)
@@ -8,17 +8,30 @@ 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("quicknote")
 gettext.install('quicknote', unicode = 1)
+sys.path.append('/usr/lib/quicknote')
+
 
-import libquicknote
+import constants
+import quicknote_gtk
 
 
 if __name__ == "__main__":
-       app = libquicknote.QuicknoteProgram()
+       try:
+               os.makedirs(constants._data_path_)
+       except OSError, e:
+               if e.errno != 17:
+                       raise
+
+       userLogPath = "%s/quicknote.log" % constants._data_path_
+       logging.basicConfig(level=logging.DEBUG, filename=userLogPath)
+       _moduleLogger.info("quicknote %s-%s" % (constants.__version__, constants.__build__))
+
+       app = quicknote_gtk.QuicknoteProgram()
        app.main()