Enhance compatibility
Adding the path to '.settings.pkl' file, this is especailly useful for MacOS. Then we can put '.settings.pkl' into 'MacOS' folder within 'labelImg.app'. The App will crash without path setting, as soon as we close the App in MacOS.
This commit is contained in:
parent
6222214ff3
commit
a1decb8e24
@ -1,10 +1,11 @@
|
||||
import pickle
|
||||
import os
|
||||
import sys
|
||||
|
||||
class Settings(object):
|
||||
def __init__(self):
|
||||
self.data = {}
|
||||
self.path = '.settings.pkl'
|
||||
self.path = os.path.join(os.path.dirname(sys.argv[0]), '.settings.pkl')
|
||||
|
||||
def __setitem__(self, key, value):
|
||||
self.data[key] = value
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user