changed how we search for config files on windows

This commit is contained in:
James Hensman 2013-11-13 11:41:58 +00:00
parent e1e030e72b
commit df118a404d

View file

@ -5,7 +5,8 @@ import ConfigParser
import os
config = ConfigParser.ConfigParser()
user_file = os.path.join(os.getenv('HOME'),'.gpy_config.cfg')
home = os.getenv('HOME') or os.getenv('USERPROFILE')
user_file = os.path.join(home,'.gpy_config.cfg')
default_file = os.path.join('..','gpy_config.cfg')
# 1. check if the user has a ~/.gpy_config.cfg