Skip to content

Commit

Permalink
[svn] fixing readline support in the stock interactive console shell
Browse files Browse the repository at this point in the history
--HG--
branch : trunk
  • Loading branch information
pjenvey committed Oct 23, 2006
1 parent 98c58e4 commit bcbe356
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
4 changes: 4 additions & 0 deletions pylons/commands.py
Expand Up @@ -241,4 +241,8 @@ def raw_input(self, *args, **kw):
raise EOFError

shell = CustomShell(locals=locs)
try:
import readline
except ImportError:
pass
shell.interact(banner)
Expand Up @@ -2,14 +2,13 @@ from paste import httpexceptions
from paste.cascade import Cascade
from paste.urlparser import StaticURLParser
from paste.registry import RegistryManager
from paste.deploy.config import ConfigMiddleware
from paste.deploy.config import CONFIG, ConfigMiddleware

from pylons.error import error_template
from pylons.middleware import ErrorHandler, ErrorDocuments, StaticJavascripts, error_mapper
import pylons.wsgiapp

from ${package}.config.environment import load_environment
import ${package}.lib.helpers

def make_app(global_conf, **app_conf):
"""Create a WSGI application and return it
Expand All @@ -19,11 +18,16 @@ def make_app(global_conf, **app_conf):
to ensure they're treated properly.

"""
process_config = {'global_conf': global_conf,
'app_conf': app_conf}
CONFIG.push_process_config(process_config)

# Load our Pylons configuration defaults
config = load_environment(global_conf, app_conf)
config.init_app(global_conf, app_conf, package='${package}')

# Load our default Pylons WSGI app and make g available
import ${package}.lib.helpers
app = pylons.wsgiapp.PylonsApp(config, helpers=${package}.lib.helpers)
g = app.globals
app = ConfigMiddleware(app, {'app_conf':app_conf,
Expand Down Expand Up @@ -55,4 +59,5 @@ def make_app(global_conf, **app_conf):
# @@@ Establish the Registry for this application @@@
app = RegistryManager(app)

CONFIG.pop_process_config(process_config)
return app

0 comments on commit bcbe356

Please sign in to comment.