Flask update

This commit is contained in:
Ruud
2011-08-24 20:59:59 +02:00
parent 970b400a0c
commit d7f758dff4
90 changed files with 3328 additions and 1236 deletions
+7 -3
View File
@@ -67,7 +67,7 @@ r'''
or as named parameters, pretty much like Python function calls.
:copyright: (c) 2010 by the Werkzeug Team, see AUTHORS for more details.
:copyright: (c) 2011 by the Werkzeug Team, see AUTHORS for more details.
:license: BSD, see LICENSE for more details.
'''
import sys
@@ -262,11 +262,15 @@ def make_shell(init_func=None, banner=None, use_ipython=True):
namespace = init_func()
if ipython:
try:
import IPython
try:
from IPython.frontend.terminal.embed import InteractiveShellEmbed
sh = InteractiveShellEmbed(banner1=banner)
except ImportError:
from IPython.Shell import IPShellEmbed
sh = IPShellEmbed(banner=banner)
except ImportError:
pass
else:
sh = IPython.Shell.IPShellEmbed(banner=banner)
sh(global_ns={}, local_ns=namespace)
return
from code import interact