#!/usr/bin/python
'''
Startup script for an installed copy of the LSR. Configures the Python path
so LSR modules can be imported properly. After configuring the path, imports
the L{LSRMain} and calls L{LSRMain.main} to parse command line arguments.

@author: Peter Parente
@organization: IBM Corporation
@copyright: Copyright (c) 2005 IBM Corporation
@license: Common Public License 1.0

All rights reserved. This program and the accompanying materials are made 
available under the terms of the Common Public License v1.0 which accompanies
this distribution, and is available at 
U{http://www.opensource.org/licenses/cpl1.0.php}
'''
import sys, os, os.path
# depends on if configuration gets stored in .py files in the future
# sys.path.insert(1, os.path.join(os.environ['HOME'], '.lsr'))

# add the LSR library folder to the Python path
# configure doesn't fully resolve ${pythondir}/lsr so building manually
sys.path.insert(1, os.path.join('/usr', 'lib', 'python2.4', 
                'site-packages', 'lsr'))

# run the LSRMain function to handle command line args and start the program
import LSRMain
LSRMain.main()