File: thuban.py

package info (click to toggle)
thuban 1.2.2-14
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 9,176 kB
  • sloc: python: 30,410; ansic: 6,181; xml: 4,234; cpp: 1,595; makefile: 145
file content (39 lines) | stat: -rwxr-xr-x 965 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#! /usr/bin/python

# Copyright (c) 2001 by Intevation GmbH
# Authors:
# Bernhard Herzog <bh@intevation.de>
#
# This program is free software under the GPL (>=v2)
# Read the file COPYING coming with Thuban for details.

import sys, os
import Thuban

import wxversion
wxversion.select("3.0")

# Put the Lib dir into the path. The Lib dir contains some extra non
# really Thuban specific Python modules
thubandir = os.path.join(Thuban.__path__[0], '..')
dir = os.path.join(thubandir, "Lib")
if os.path.isdir(dir):
    sys.path.insert(0, dir)

# win32 gdal support
if sys.platform == 'win32':
    # PYTHONPATH update
    dir = os.path.join(thubandir, "gdal", "pymod")
    if os.path.isdir(dir):
        sys.path.append(dir)

    try:
        import gdal
    except ImportError:
        print "Please update your PATH environment variable to include %s\\gdal\\bin" % thubandir

import Thuban.UI.main

# Start Thuban
if __name__ == "__main__":
    Thuban.UI.main.main()