import os,sys,string

################################
# installation path
################################
NBODYPATH = os.path.dirname(__file__)

################################
# home directory
################################
HOME = os.environ['HOME']

################################
# default config directory
################################
CONFIGDIR  = os.path.join(NBODYPATH,'config')

# parameter file
PARAMETERFILE = os.path.join(CONFIGDIR,'defaultparameters')
if os.path.isfile(os.path.join(HOME,'.pNbody','defaultparameters')):
  PARAMETERFILE=os.path.join(HOME,'.pNbody','defaultparameters')  

# parameter file
UNITSPARAMETERFILE = os.path.join(CONFIGDIR,'unitsparameters')
if os.path.isfile(os.path.join(HOME,'.pNbody','unitsparameters')):
  UNITSPARAMETERFILE=os.path.join(HOME,'.pNbody','unitsparameters')  

# default palette dir
PALETTEDIR = os.path.join(CONFIGDIR,'rgb_tables')
if os.path.isdir(os.path.join(HOME,'.pNbody','rgb_tables')):
  PALETTEDIR = os.path.join(os.path.join(HOME,'.pNbody','rgb_tables'))
# default plugins dir
PLUGINSDIR = os.path.join(CONFIGDIR,'plugins')
if os.path.isdir(os.path.join(HOME,'.pNbody','plugins')):
  PLUGINSDIR = os.path.join(os.path.join(HOME,'.pNbody','plugins'))


# user format dir
if os.path.isdir(os.path.join(HOME,'.pNbody','formats')):
  FORMATSDIR = os.path.join(HOME,'.pNbody','formats')
else:
  FORMATSDIR = os.path.join(CONFIGDIR,'formats')

 
# default format file
#if os.path.isfile(os.path.join(NBODYPATH,'formats.py')):
#  FORMATSFILE = os.path.join(NBODYPATH,'formats.py')
#else:
#  FORMATSFILE = None
 
  
# user format file    
#if os.path.isfile(os.path.join(HOME,'.pNbody','formats.py')):
#  USERFORMATSFILE = os.path.join(HOME,'.pNbody','formats.py')
#else:
#  USERFORMATSFILE = os.path.join(HOME,'CONFIGDIR','formats.py')


# other parameters
DEFAULTPALETTE = 'light'
