Deavid: Improvements to prevent steam loss
[lightyears.git] / lightyears
blobe9a5ce868e7482814ce7777a780dc8ffa32fed68
1 #!/usr/bin/python
3 # Set the location of the LightYears .py files here:
4 LIGHTYEARS_DIR = "/home/deavid/git/lightyears"
6 # Save games and configuration files are stored in the user's
7 # home directory.
10 if ( __name__ == "__main__" ):
11 import sys, os
13 if (( LIGHTYEARS_DIR == None )
14 or ( not os.path.exists(LIGHTYEARS_DIR) )):
15 # Try current directory
16 LIGHTYEARS_DIR = os.path.abspath(
17 os.path.dirname(sys.argv[ 0 ]))
19 sys.path.insert(0, os.path.join(LIGHTYEARS_DIR, 'code'))
21 try:
22 import startup
23 except:
24 print "Unable to find LightYears code in", LIGHTYEARS_DIR
25 sys.exit(1)
27 startup.Main(os.path.join(LIGHTYEARS_DIR, 'data'))