diff options
| author | Andrea Crotti | 2012-03-13 03:39:46 +0000 |
|---|---|---|
| committer | Andrea Crotti | 2012-03-13 03:39:46 +0000 |
| commit | f66b5879531dc37509402cc17c1e7bfe817d964c (patch) | |
| tree | 9ee101ed4fcc72c6786885265babe735c17e8578 /src/mailman/commands | |
| parent | cb8ee7cd32917fe58a12d4ae767b167356f0a1f5 (diff) | |
| download | mailman-f66b5879531dc37509402cc17c1e7bfe817d964c.tar.gz mailman-f66b5879531dc37509402cc17c1e7bfe817d964c.tar.zst mailman-f66b5879531dc37509402cc17c1e7bfe817d964c.zip | |
Diffstat (limited to 'src/mailman/commands')
| -rw-r--r-- | src/mailman/commands/cli_withlist.py | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/src/mailman/commands/cli_withlist.py b/src/mailman/commands/cli_withlist.py index bc25363b1..dd1596227 100644 --- a/src/mailman/commands/cli_withlist.py +++ b/src/mailman/commands/cli_withlist.py @@ -27,9 +27,9 @@ __all__ = [ import re +import sys from lazr.config import as_boolean - from zope.component import getUtility from zope.interface import implements @@ -150,25 +150,24 @@ class Withlist: commit=config.db.commit, abort=config.db.abort, config=config, - ) - banner = '\n'.join([unicode(config.shell.banner), banner]) + ) + + banner = config.shell.banner + '\n' + banner if as_boolean(config.shell.use_ipython): - self._start_ipython(overrides, banner) #config.shell.banner) + self._start_ipython(overrides, banner) else: - self._start_python(overrides, banner) #config.shell.banner) + self._start_python(overrides, banner) def _start_ipython(self, overrides, banner): try: from IPython.frontend.terminal.embed import InteractiveShellEmbed - ipshell = InteractiveShellEmbed(banner1=banner, - user_ns=overrides) + ipshell = InteractiveShellEmbed(banner1=banner, user_ns=overrides) ipshell() except ImportError: - print _("ipython is not available, set use_ipython to no") + print _('ipython is not available, set use_ipython to no') def _start_python(self, overrides, banner): # set the tab completion - import sys try: import readline, rlcompleter readline.parse_and_bind('tab: complete') @@ -176,8 +175,7 @@ class Withlist: pass else: sys.ps1 = config.shell.ps1 + ' ' - interact(upframe=False, banner=config.shell.banner, - overrides=overrides) + interact(upframe=False, banner=banner, overrides=overrides) def _details(self): """Print detailed usage.""" |
