# Copyright (C) 2003 by Intevation GmbH # Authors: # Thomas Arendsen Hein # # This program is free software under the GPL (>=v2) # Read the file COPYING coming with the software for details. """ Insert the package directory at the beginning of the python path. """ __version__ = "$Revision: 1.3 $" # $Source: /greaterrepository/sciparam/SciParam/UI/sciparampath.py,v $ # $Id: sciparampath.py,v 1.3 2003/09/29 16:39:19 thomas Exp $ import sys, os, os.path dir = os.path.join(os.path.dirname(sys.argv[0]), os.pardir, os.pardir) while 1: try: sys.path.remove(dir) except ValueError: break sys.path.insert(0, dir)