~rachidbm/ubuntu-l10n-tools/search

« back to all changes in this revision

Viewing changes to bin/ul10n-tools

  • Committer: David Planella
  • Date: 2011-05-20 11:55:08 UTC
  • Revision ID: david.planella@ubuntu.com-20110520115508-o9b8yz2o9mg3gc5x
Checkpoint commit. This is still very much work in progress

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#!/usr/bin/python
2
 
# -*- Mode: Python; coding: utf-8; indent-tabs-mode: nil; tab-width: 4 -*-
3
 
### BEGIN LICENSE
4
 
# This file is in the public domain
5
 
### END LICENSE
6
 
 
7
 
import os
8
 
import sys
9
 
 
10
 
# Add project root directory (enable symlink, and trunk execution).
11
 
PROJECT_ROOT_DIRECTORY = os.path.abspath(
12
 
    os.path.dirname(os.path.dirname(os.path.realpath(sys.argv[0]))))
13
 
 
14
 
if (os.path.exists(os.path.join(PROJECT_ROOT_DIRECTORY, 'ul10n_tools'))
15
 
    and PROJECT_ROOT_DIRECTORY not in sys.path):
16
 
    sys.path.insert(0, PROJECT_ROOT_DIRECTORY)
17
 
    os.putenv('PYTHONPATH', PROJECT_ROOT_DIRECTORY) # for subprocesses
18
 
 
19
 
import ul10n_tools
20
 
ul10n_tools.main()