Fix the issue that is unable to import libs if installing by pip

This commit is contained in:
tzutalin
2017-09-27 17:57:09 +08:00
parent 5dab21b847
commit d8e961126a
2 changed files with 9 additions and 18 deletions
+3 -1
View File
@@ -4,8 +4,10 @@ import sys
class Settings(object):
def __init__(self):
# Be default, the home will be in the same folder as labelImg
home = os.path.expanduser("~")
self.data = {}
self.path = os.path.join(os.path.dirname(sys.argv[0]), '.settings.pkl')
self.path = os.path.join(home, '.settings.pkl')
def __setitem__(self, key, value):
self.data[key] = value