6 |
# Read the file COPYING coming with Thuban for details. |
# Read the file COPYING coming with Thuban for details. |
7 |
|
|
8 |
import os |
import os |
9 |
|
import os.path |
10 |
|
from tempfile import mktemp |
11 |
|
|
12 |
import Thuban |
import Thuban |
13 |
from Thuban import _ |
from Thuban import _ |
14 |
|
|
20 |
projdir = \ |
projdir = \ |
21 |
os.path.join(Thuban.__path__[0], os.pardir, "Resources", "Projections") |
os.path.join(Thuban.__path__[0], os.pardir, "Resources", "Projections") |
22 |
|
|
23 |
usrdir = os.path.expanduser("~/.thuban") |
if os.name == 'nt': |
24 |
|
# This should result in something like the user directory ... |
25 |
|
guess = os.path.dirname(os.path.dirname(os.path.dirname(mktemp()))) |
26 |
|
usrdir = os.path.join(guess, ".thuban") |
27 |
|
if not os.path.isdir(usrdir): |
28 |
|
os.mkdir(usrdir) |
29 |
|
else: |
30 |
|
usrdir = os.path.expanduser("~/.thuban") |
31 |
|
|
32 |
PROJ_EXT = ".proj" |
PROJ_EXT = ".proj" |
33 |
|
|