Show More
@@ -272,10 +272,7 b' class BaseIPythonApplication(Application):' | |||||
272 | if self.profile_dir is not None: |
|
272 | if self.profile_dir is not None: | |
273 | # already ran |
|
273 | # already ran | |
274 | return |
|
274 | return | |
275 | try: |
|
275 | if 'ProfileDir.location' not in self.config: | |
276 | # location explicitly specified: |
|
|||
277 | location = self.config.ProfileDir.location |
|
|||
278 | except AttributeError: |
|
|||
279 | # location not specified, find by profile name |
|
276 | # location not specified, find by profile name | |
280 | try: |
|
277 | try: | |
281 | p = ProfileDir.find_profile_dir_by_name(self.ipython_dir, self.profile, self.config) |
|
278 | p = ProfileDir.find_profile_dir_by_name(self.ipython_dir, self.profile, self.config) | |
@@ -295,6 +292,7 b' class BaseIPythonApplication(Application):' | |||||
295 | else: |
|
292 | else: | |
296 | self.log.info("Using existing profile dir: %r"%p.location) |
|
293 | self.log.info("Using existing profile dir: %r"%p.location) | |
297 | else: |
|
294 | else: | |
|
295 | location = self.config.ProfileDir.location | |||
298 | # location is fully specified |
|
296 | # location is fully specified | |
299 | try: |
|
297 | try: | |
300 | p = ProfileDir.find_profile_dir(location, self.config) |
|
298 | p = ProfileDir.find_profile_dir(location, self.config) |
@@ -399,9 +399,9 b' class IPControllerApp(BaseParallelApplication):' | |||||
399 | q.connect_mon(monitor_url) |
|
399 | q.connect_mon(monitor_url) | |
400 | q.daemon=True |
|
400 | q.daemon=True | |
401 | children.append(q) |
|
401 | children.append(q) | |
402 | try: |
|
402 | if 'TaskScheduler.scheme_name' in self.config: | |
403 | scheme = self.config.TaskScheduler.scheme_name |
|
403 | scheme = self.config.TaskScheduler.scheme_name | |
404 | except AttributeError: |
|
404 | else: | |
405 | scheme = TaskScheduler.scheme_name.get_default_value() |
|
405 | scheme = TaskScheduler.scheme_name.get_default_value() | |
406 | # Task Queue (in a Process) |
|
406 | # Task Queue (in a Process) | |
407 | if scheme == 'pure': |
|
407 | if scheme == 'pure': |
@@ -211,14 +211,9 b' class IPEngineApp(BaseParallelApplication):' | |||||
211 |
|
211 | |||
212 | # allow hand-override of location for disambiguation |
|
212 | # allow hand-override of location for disambiguation | |
213 | # and ssh-server |
|
213 | # and ssh-server | |
214 | try: |
|
214 | if 'EngineFactory.location' not in config: | |
215 | config.EngineFactory.location |
|
|||
216 | except AttributeError: |
|
|||
217 | config.EngineFactory.location = d['location'] |
|
215 | config.EngineFactory.location = d['location'] | |
218 |
|
216 | if 'EngineFactory.sshserver' not in config: | ||
219 | try: |
|
|||
220 | config.EngineFactory.sshserver |
|
|||
221 | except AttributeError: |
|
|||
222 | config.EngineFactory.sshserver = d.get('ssh') |
|
217 | config.EngineFactory.sshserver = d.get('ssh') | |
223 |
|
218 | |||
224 | location = config.EngineFactory.location |
|
219 | location = config.EngineFactory.location | |
@@ -313,21 +308,17 b' class IPEngineApp(BaseParallelApplication):' | |||||
313 | self.log.fatal("Fatal: url file never arrived: %s", self.url_file) |
|
308 | self.log.fatal("Fatal: url file never arrived: %s", self.url_file) | |
314 | self.exit(1) |
|
309 | self.exit(1) | |
315 |
|
310 | |||
|
311 | exec_lines = [] | |||
|
312 | for app in ('IPKernelApp', 'InteractiveShellApp'): | |||
|
313 | if '%s.exec_lines' in config: | |||
|
314 | exec_lines = config.IPKernelApp.exec_lines = config[app].exec_lines | |||
|
315 | break | |||
316 |
|
316 | |||
317 | try: |
|
317 | exec_files = [] | |
318 | exec_lines = config.IPKernelApp.exec_lines |
|
318 | for app in ('IPKernelApp', 'InteractiveShellApp'): | |
319 | except AttributeError: |
|
319 | if '%s.exec_files' in config: | |
320 | try: |
|
320 | exec_files = config.IPKernelApp.exec_files = config[app].exec_files | |
321 | exec_lines = config.InteractiveShellApp.exec_lines |
|
321 | break | |
322 | except AttributeError: |
|
|||
323 | exec_lines = config.IPKernelApp.exec_lines = [] |
|
|||
324 | try: |
|
|||
325 | exec_files = config.IPKernelApp.exec_files |
|
|||
326 | except AttributeError: |
|
|||
327 | try: |
|
|||
328 | exec_files = config.InteractiveShellApp.exec_files |
|
|||
329 | except AttributeError: |
|
|||
330 | exec_files = config.IPKernelApp.exec_files = [] |
|
|||
331 |
|
322 | |||
332 | if self.startup_script: |
|
323 | if self.startup_script: | |
333 | exec_files.append(self.startup_script) |
|
324 | exec_files.append(self.startup_script) |
@@ -255,10 +255,9 b' class HubFactory(RegistrationFactory):' | |||||
255 |
|
255 | |||
256 | ctx = self.context |
|
256 | ctx = self.context | |
257 | loop = self.loop |
|
257 | loop = self.loop | |
258 |
|
258 | if 'TaskScheduler.scheme_name' in self.config: | ||
259 | try: |
|
|||
260 | scheme = self.config.TaskScheduler.scheme_name |
|
259 | scheme = self.config.TaskScheduler.scheme_name | |
261 | except AttributeError: |
|
260 | else: | |
262 | from .scheduler import TaskScheduler |
|
261 | from .scheduler import TaskScheduler | |
263 | scheme = TaskScheduler.scheme_name.get_default_value() |
|
262 | scheme = TaskScheduler.scheme_name.get_default_value() | |
264 |
|
263 |
@@ -281,18 +281,10 b' class IPythonQtConsoleApp(BaseIPythonApplication, IPythonConsoleApp):' | |||||
281 | # are removed from the backend. |
|
281 | # are removed from the backend. | |
282 |
|
282 | |||
283 | # parse the colors arg down to current known labels |
|
283 | # parse the colors arg down to current known labels | |
284 | try: |
|
284 | cfg = self.config | |
285 | colors = self.config.ZMQInteractiveShell.colors |
|
285 | colors = cfg.ZMQInteractiveShell.colors if 'ZMQInteractiveShell.colors' in cfg else None | |
286 | except AttributeError: |
|
286 | style = cfg.IPythonWidget.syntax_style if 'IPythonWidget.syntax_style' in cfg else None | |
287 | colors = None |
|
287 | sheet = cfg.IPythonWidget.style_sheet if 'IPythonWidget.style_sheet' in cfg else None | |
288 | try: |
|
|||
289 | style = self.config.IPythonWidget.syntax_style |
|
|||
290 | except AttributeError: |
|
|||
291 | style = None |
|
|||
292 | try: |
|
|||
293 | sheet = self.config.IPythonWidget.style_sheet |
|
|||
294 | except AttributeError: |
|
|||
295 | sheet = None |
|
|||
296 |
|
288 | |||
297 | # find the value for colors: |
|
289 | # find the value for colors: | |
298 | if colors: |
|
290 | if colors: |
General Comments 0
You need to be logged in to leave comments.
Login now