90 @keyparam pwl name of the personal/project word list (string) |
90 @keyparam pwl name of the personal/project word list (string) |
91 @keyparam pel name of the personal/project exclude list (string) |
91 @keyparam pel name of the personal/project exclude list (string) |
92 @return reference to the dictionary (enchant.Dict) |
92 @return reference to the dictionary (enchant.Dict) |
93 """ |
93 """ |
94 if not pwl: |
94 if not pwl: |
95 pwl = unicode(Preferences.getEditor("SpellCheckingPersonalWordList")) |
95 pwl = Preferences.getEditor("SpellCheckingPersonalWordList") |
96 if not pwl: |
96 if not pwl: |
97 pwl = os.path.join(Utilities.getConfigDir(), "spelling", "pwl.dic") |
97 pwl = os.path.join(Utilities.getConfigDir(), "spelling", "pwl.dic") |
98 d = os.path.dirname(pwl) |
98 d = os.path.dirname(pwl) |
99 if not os.path.exists(d): |
99 if not os.path.exists(d): |
100 os.makedirs(d) |
100 os.makedirs(d) |
101 |
101 |
102 if not pel: |
102 if not pel: |
103 pel = unicode(Preferences.getEditor("SpellCheckingPersonalExcludeList")) |
103 pel = Preferences.getEditor("SpellCheckingPersonalExcludeList") |
104 if not pel: |
104 if not pel: |
105 pel = os.path.join(Utilities.getConfigDir(), "spelling", "pel.dic") |
105 pel = os.path.join(Utilities.getConfigDir(), "spelling", "pel.dic") |
106 d = os.path.dirname(pel) |
106 d = os.path.dirname(pel) |
107 if not os.path.exists(d): |
107 if not os.path.exists(d): |
108 os.makedirs(d) |
108 os.makedirs(d) |