Added jblite-compatible stubs and removed jbparse code. Program starts up again.
[jben2_gui.git] / jben / jben_globals.py
blob2c794cf29e25a20fceb7bf23f85d538df7c4455e
1 #!/usr/bin/env python
2 # -*- coding: utf-8 -*-
4 # Project: J-Ben, Python front-end
5 # File: jben_global.py
6 # Author: Paul Goins
7 # Created on: 25 Nov 2008
9 from __future__ import absolute_import
11 import os
12 import gettext
13 gettext.install("jben")
15 VERSION_STR = "1.9.2"
16 """This is the current version of J-Ben."""
18 # These were "constants" under the C++ interface.
19 # However, since J-Ben has an alternate Japanese name (J勉),
20 # and since my name can be written in katakana, or the copyright
21 # date written in other numbering systems (heisei-based, etc.),
22 # I'm now using gettext on these "constants".
23 PROGRAM_NAME = _("J-Ben/python")
24 """The name of this edition of J-Ben."""
25 AUTHOR_NAME = _("Paul Goins")
26 """The name of the author."""
27 COPYRIGHT_DATE = _("2007, 2008, 2009, 2010")
28 """Copyright date."""
31 JB_DATADIR = None
32 """
33 This represents the default data directory for J-Ben. For UNIX-type systems,
34 this typically is "/usr/local/share/jben" or "/usr/share/jben". For Windows
35 systems, it should be "..". (Note the /; J-Ben will convert /'s to \'s as
36 necessary.)
38 If JB_DATADIR is None, then J-Ben will try to search all these locations for
39 the data folder. This can be overridden by specifying a specific value here.
40 """
42 if JB_DATADIR is None:
43 if os.name == "nt":
44 JB_DATADIR = ".."
45 else:
46 if os.path.isdir("/usr/local/share/jben"):
47 JB_DATADIR = "/usr/local/share/jben"
48 elif os.path.isdir("/usr/share/jben"):
49 JB_DATADIR = "/usr/share/jben"
50 else:
51 JB_DATADIR = ".." # Fallback; this may be used on future Linux-based
52 # mobile installs.
53 pass
55 if os.name == "nt":
56 CFG_FOLDER = "J-Ben Settings"
57 HOME_ENV = "APPDATA"
58 else:
59 CFG_FOLDER = ".jben.d"
60 HOME_ENV = "HOME"