diff options
-rw-r--r-- | docs/source/commands.rst | 11 | ||||
-rw-r--r-- | pecan/commands/shell.py | 5 |
2 files changed, 10 insertions, 6 deletions
diff --git a/docs/source/commands.rst b/docs/source/commands.rst index fe87579..83a5322 100644 --- a/docs/source/commands.rst +++ b/docs/source/commands.rst @@ -84,7 +84,14 @@ command:: >>> app.get('/') <200 OK text/html body='<html>\n ...\n\n'/936> +Press ``Ctrl-D`` to exit the interactive shell (or ``Ctrl-Z`` on Windows). + Using an Alternative Shell ++++++++++++++++++++++++++ -Pecan has support for the `IPython <http://ipython.org/>`_ and `bpython -<http://bpython-interpreter.org/>`_ alternative shells. +``pecan shell`` has optional support for the `IPython <http://ipython.org/>`_ +and `bpython <http://bpython-interpreter.org/>`_ alternative shells, each of +which can be specified with the ``--shell`` flag (or its abbreviated alias, +``-s``), e.g., +:: + $ pecan shell --shell=ipython config.py + $ pecan shell -s bpython config.py diff --git a/pecan/commands/shell.py b/pecan/commands/shell.py index b562f1d..3a72558 100644 --- a/pecan/commands/shell.py +++ b/pecan/commands/shell.py @@ -74,10 +74,7 @@ class BPythonShell(object): Embed an interactive bpython shell. """ - try: - from bpython import embed - except ImportError: - pass + from bpython import embed shell = embed(ns, ['-i'], banner) |