1 |
bh |
6 |
#! /usr/bin/python |
2 |
|
|
|
3 |
|
|
# Copyright (c) 2001 by Intevation GmbH |
4 |
|
|
# Authors: |
5 |
|
|
# Bernhard Herzog <[email protected]> |
6 |
|
|
# |
7 |
|
|
# This program is free software under the GPL (>=v2) |
8 |
|
|
# Read the file COPYING coming with Thuban for details. |
9 |
|
|
|
10 |
|
|
import sys, os |
11 |
|
|
import Thuban |
12 |
|
|
|
13 |
|
|
# Put the Lib dir into the path. The Lib dir contains some extra non |
14 |
|
|
# really Thuban specific Python modules |
15 |
|
|
thubandir = os.path.join(Thuban.__path__[0], '..') |
16 |
|
|
dir = os.path.join(thubandir, "Lib") |
17 |
|
|
if os.path.isdir(dir): |
18 |
|
|
sys.path.insert(0, dir) |
19 |
|
|
|
20 |
dpinte |
2711 |
# win32 gdal support |
21 |
|
|
if sys.platform == 'win32': |
22 |
|
|
# PYTHONPATH update |
23 |
|
|
dir = os.path.join(thubandir, "gdal", "pymod") |
24 |
|
|
if os.path.isdir(dir): |
25 |
|
|
sys.path.append(dir) |
26 |
|
|
|
27 |
|
|
try: |
28 |
|
|
import gdal |
29 |
|
|
except ImportError: |
30 |
|
|
print "Please update your PATH environment variable to include %s\\gdal\\bin" % thubandir |
31 |
|
|
|
32 |
bh |
6 |
import Thuban.UI.main |
33 |
|
|
|
34 |
|
|
# Start Thuban |
35 |
|
|
Thuban.UI.main.main() |
36 |
|
|
|
37 |
|
|
|