Skip to content

Commit

Permalink
add initialize() to BaseIPythonApplication
Browse files Browse the repository at this point in the history
initialize loads config, and ensures command-line opts override those specified in config files.
  • Loading branch information
minrk committed May 25, 2011
1 parent 8b9e185 commit 5742cd3
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions IPython/core/newapplication.py
Expand Up @@ -131,3 +131,12 @@ def load_config_file(self, suppress_errors=True):
self.log.warn("Error loading config file: %s" %
self.config_file_name, exc_info=True)

def initialize(self, argv=None):
self.init_crash_handler()
self.parse_command_line(argv)
cl_config = self.config
self.load_config_file()
# enforce cl-opts override configfile opts:
self.update_config(cl_config)


0 comments on commit 5742cd3

Please sign in to comment.