168 # get a copy of the defaults to store the user settings |
168 # get a copy of the defaults to store the user settings |
169 self.parameters = copy.deepcopy(self.defaults) |
169 self.parameters = copy.deepcopy(self.defaults) |
170 |
170 |
171 # combine it with the values of parms |
171 # combine it with the values of parms |
172 if parms is not None: |
172 if parms is not None: |
173 for key, value in parms.items(): |
173 self.parameters.update(parms) |
174 if key in self.parameters: |
|
175 self.parameters[key] = parms[key] |
|
176 |
174 |
177 self.exe = exe |
175 self.exe = exe |
178 self.cxfreezeExecCombo.addItems(exe) |
176 self.cxfreezeExecCombo.addItems(exe) |
179 # try to set the saved script path |
177 # try to set the saved script path |
180 try: |
178 try: |
433 modpath = os.path.join( |
431 modpath = os.path.join( |
434 dirname, "Lib", "site-packages", "cx_Freeze") |
432 dirname, "Lib", "site-packages", "cx_Freeze") |
435 if not os.path.exists(modpath): |
433 if not os.path.exists(modpath): |
436 # but if it failed search in the whole directory tree |
434 # but if it failed search in the whole directory tree |
437 modpath = None |
435 modpath = None |
438 for dirpath, dirnames, filenames in os.walk(dirname): |
436 for dirpath, dirnames, _ in os.walk(dirname): |
439 if 'cx_Freeze' in dirnames: |
437 if 'cx_Freeze' in dirnames: |
440 modpath = os.path.join(dirpath, "cx_Freeze") |
438 modpath = os.path.join(dirpath, "cx_Freeze") |
441 break |
439 break |
442 else: |
440 else: |
443 with open(text, 'r') as f: |
441 with open(text, 'r') as f: |