From d3730af63891f1e35f5cb17c139fd85776a8e2ad Mon Sep 17 00:00:00 2001 From: Michael Merickel Date: Sun, 11 Oct 2015 22:07:40 -0500 Subject: order shells alphabetically instead of prioritizing ipython/bpython --- pyramid/scripts/pshell.py | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/pyramid/scripts/pshell.py b/pyramid/scripts/pshell.py index 9c2573caa..78ff66853 100644 --- a/pyramid/scripts/pshell.py +++ b/pyramid/scripts/pshell.py @@ -169,21 +169,16 @@ class PShellCommand(object): def make_shell(self): shells = {} - priority_order = ['ipython', 'bpython', 'python'] - for ep in self.pkg_resources.iter_entry_points('pyramid.pshell'): name = ep.name shell_module = ep.load() shells[name] = shell_module - sorted_shells = sorted( - shells.items(), key=lambda x: priority_order.index(x[0]) - ) - shell = None user_shell = self.options.python_shell.lower() if not user_shell: + sorted_shells = sorted(shells.items(), key=lambda k, v: k) for name, factory in sorted_shells: shell = factory() -- cgit v1.2.3