#!/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, 2007 IBM Corporation
@license: The BSD License

All rights reserved. This program and the accompanying materials are made 
available under the terms of the BSD license which accompanies
this distribution, and is available at 
U{http://www.opensource.org/licenses/bsd-license.php}
'''
import sys, os, os.path
# add the LSR library folder to the Python path
# We can't rely on /usr if we're installed by relocated RPM. Instead, we 
# use __file__ and for now hope that lib is relative to bin.
libs = os.path.join(os.path.dirname(__file__), '..', 'lib',
                    'python2.5', 'site-packages', 'lsr')
pkg_path = os.path.normpath(libs)

# run the LSRMain function to handle command line args and start the program
if __name__ == '__main__':
  sys.path.insert(1, pkg_path)
  import LSRMain
  LSRMain.main()
