9410944e6e244e462102cbd37d5815d82eedfed0
[quicknote] / src / quicknote.py
1 #!/usr/bin/env python
2 # -*- coding: utf-8 -*-
3
4 """
5 Copyright (C) 2007 Christoph Würstle
6 This program is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License version 2 as
8 published by the Free Software Foundation.
9 """
10
11 import os
12 import sys
13 import logging
14 import gettext
15
16 _moduleLogger = logging.getLogger("quicknote")
17 gettext.install('quicknote', unicode = 1)
18 sys.path.append('/usr/lib/quicknote')
19
20
21 import constants
22 import libquicknote
23
24
25 if __name__ == "__main__":
26         try:
27                 os.makedirs(constants._data_path_)
28         except OSError, e:
29                 if e.errno != 17:
30                         raise
31
32         userLogPath = "%s/quicknote.log" % constants._data_path_
33         logging.basicConfig(level=logging.DEBUG, filename=userLogPath)
34         _moduleLogger.info("quicknote %s-%s" % (constants.__version__, constants.__build__))
35
36         app = libquicknote.QuicknoteProgram()
37         app.main()