diff options
| author | Chris McDonough <chrism@plope.com> | 2010-12-23 19:01:22 -0500 |
|---|---|---|
| committer | Chris McDonough <chrism@plope.com> | 2010-12-23 19:01:22 -0500 |
| commit | 52a4aabd679a9e9e91a579d1546abd5dfbe2931d (patch) | |
| tree | 334b3e0e4358908e581a165b16f40a3a80590793 | |
| parent | 53901dbad3cc176c86d8ab570a2d18759fb01160 (diff) | |
| download | pyramid-52a4aabd679a9e9e91a579d1546abd5dfbe2931d.tar.gz pyramid-52a4aabd679a9e9e91a579d1546abd5dfbe2931d.tar.bz2 pyramid-52a4aabd679a9e9e91a579d1546abd5dfbe2931d.zip | |
share shell globals between interact and IPShell
| -rw-r--r-- | pyramid/paster.py | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/pyramid/paster.py b/pyramid/paster.py index 0a0b65fe0..c8bc36e80 100644 --- a/pyramid/paster.py +++ b/pyramid/paster.py @@ -121,18 +121,17 @@ class PShellCommand(Command): self.logging_file_config(config_file) app = self.get_app(config_file, section_name, loadapp=self.loadapp[0]) root, closer = self.get_root(app) + shell_globals = {'root':root, 'registry':app.registry} if IPShell is not None and not self.options.disable_ipython: try: - shell = IPShell(argv=[], user_ns={'root':root, - 'registry':app.registry}) + shell = IPShell(argv=[], user_ns=shell_globals) shell.IP.BANNER = shell.IP.BANNER + '\n\n' + banner shell.mainloop() finally: closer() else: try: - self.interact[0](banner, - local={'root':root,'registry':app.registry}) + self.interact[0](banner, local=shell_globals) finally: closer() |
