Lines 92-102
Link Here
|
92 |
|
92 |
|
93 |
if __name__ == '__main__': |
93 |
if __name__ == '__main__': |
94 |
print TITLE |
94 |
print TITLE |
95 |
if len(sys.argv) > 1: |
95 |
if len(sys.argv) > 1: |
96 |
try: |
96 |
try: |
97 |
dpath = file(os.path.join(sys.path[0], 'dictionary.pickle')) |
97 |
for p in sys.path: |
|
|
98 |
if os.path.exists(os.path.join(p, 'dictionary.pickle')): |
99 |
break |
100 |
|
101 |
dpath = file(os.path.join(p, 'dictionary.pickle')) |
98 |
dictionary = pickle.load(dpath) |
102 |
dictionary = pickle.load(dpath) |
99 |
except: |
103 |
except: |
100 |
print 'Error: Unable to load dictionary file ("dictionary.pickle").' |
104 |
print 'Error: Unable to load dictionary file ("dictionary.pickle").' |
101 |
sys.exit() |
105 |
sys.exit() |
102 |
if len(sys.argv) == 2 and not sys.argv[1].startswith('--'): |
106 |
if len(sys.argv) == 2 and not sys.argv[1].startswith('--'): |