PKÆ«'5“×2EGG-INFO/dependency_links.txt PKÆ«'5s…BÙ••EGG-INFO/entry_points.txt [paste.paster_command] controller=pylons.commands:ControllerCommand shell=pylons.commands:ShellCommand [paste.paster_create_template] pylons=pylons.util:PylonsTemplate [distutils.commands] lang_extract = pylons.i18n:LangExtract lang_compile = pylons.i18n:LangCompile [python.templating.engines] pylonsmyghty = pylons.templating:MyghtyTemplatePlugin PK˜± 5“×2EGG-INFO/not-zip-safe PKÆ«'5^çWÉ# # EGG-INFO/PKG-INFOMetadata-Version: 1.0 Name: Pylons Version: 0.9.2 Summary: Pylons Web Framework Home-page: http://www.pylonshq.com/ Author: Ben Bangert, James Gardner Author-email: ben@groovie.org License: BSD Description: Pylons ====== The Pylons web framework is aimed at making webapps and large programmatic website development in Python easy. Several key points: * A framework to make writing web applications in Python easy * Inspired by Rails and TurboGears * Utilizes a minimalist, component-based philosophy that makes it easy to expand on * Built mainly as a customization of Myghty with Routes and Paste integration * Harness existing knowledge about Python Knowing Python makes Pylons easy --------------------------------- Pylons makes it easy to expand on your knowledge of Python to master Pylons for web development. Using a MVC style dispath, Python knowledge is used at various levels: * The Controller is just a basic Python class, called for each request. Customizing the response is as easy as overriding __call__ to make your webapp work how you want. * Myghty templating compiles directly to Python byte-code for speed and utilizes Python for template control rather than creating its own template syntax for "for, while, etc" Current Status --------------- Pylons 0.9.2 described on this page is stable. There is also an unstable `develoment version `_ of Pylons. Download and Installation ------------------------- Pylons can be installed with `Easy Install `_ by typing:: > easy_install Pylons Dependant packages are automatically installed from the `Pylons download page `_ . Keywords: web wsgi framework sqlalchemy formencode myghty templates buffet Platform: UNKNOWN Classifier: Development Status :: 4 - Beta Classifier: Intended Audience :: Developers Classifier: License :: OSI Approved :: BSD License Classifier: Programming Language :: Python Classifier: Topic :: Internet :: WWW/HTTP Classifier: Topic :: Internet :: WWW/HTTP :: Dynamic Content Classifier: Topic :: Software Development :: Libraries :: Python Modules PKÆ«'5ßs,éEGG-INFO/requires.txtRoutes>=1.4.1 Myghty>=1.0.2 Paste>=0.9.8.1 PasteDeploy>=0.9.6 PasteScript>=0.9.8 FormEncode>=0.5.1 simplejson>=1.4 WebHelpers>=0.2.1 nose>=0.9.0 Beaker>=0.6.1 [test] py>=0.8.0_alpha2 [cheetah] Cheetah>=1.0 TurboCheetah>=0.9.5 [pudge] docutils>=0.4 elementtree>=1.2.6 kid>=0.9 pudge==dev,>=0.1.1dev buildutils==dev,>=0.1.2dev [full] docutils>=0.4 elementtree>=1.2.6 pudge==dev,>=0.1.1dev buildutils==dev,>=0.1.2dev py>=0.8.0_alpha2 Cheetah>=1.0 TurboCheetah>=0.9.5 kid>=0.9 TurboKid==dev,>=0.9.1dev [kid] kid>=0.9 TurboKid==dev,>=0.9.1devPKÆ«'5iÃgããEGG-INFO/SOURCES.txtCHANGELOG LICENSE README.txt setup.cfg setup.py Pylons.egg-info/PKG-INFO Pylons.egg-info/SOURCES.txt Pylons.egg-info/dependency_links.txt Pylons.egg-info/entry_points.txt Pylons.egg-info/not-zip-safe Pylons.egg-info/requires.txt Pylons.egg-info/top_level.txt docs/adding_docs.txt docs/advanced.txt docs/application_configuration.txt docs/application_setup.txt docs/authentication_and_authorization.txt docs/caching.txt docs/cred.txt docs/deployment.txt docs/development.txt docs/error_documents.txt docs/faq.txt docs/flickrsearch.txt docs/form_handling.txt docs/getting_started.txt docs/index.txt docs/install.txt docs/interactive_debugger.txt docs/internationalization.txt docs/logging.txt docs/pylonsdev.txt docs/quick_wiki.txt docs/security.txt docs/security2.txt docs/strangeness.txt docs/template_plugins.txt docs/testing_web_application.txt docs/webserver_config.txt docs/windowsnotes.txt docs/wsgi.txt docs/wsgi_theory.txt docs/pudge_template/class.html docs/pudge_template/common.html docs/pudge_template/document.html docs/pudge_template/layout.css docs/pudge_template/layout.html docs/pudge_template/master-index.html docs/pudge_template/member.html docs/pudge_template/module-index.html docs/pudge_template/module.html docs/pudge_template/package-index.html docs/pudge_template/pudge.css docs/pudge_template/rst.css docs/pudge_template/silvercity.css docs/pudge_template/transitions.html ez_setup/README.txt ez_setup/__init__.py pylons/__init__.py pylons/commands.py pylons/config.py pylons/controllers.py pylons/database.py pylons/decorator.py pylons/error.py pylons/helpers.py pylons/legacy.py pylons/middleware.py pylons/templating.py pylons/util.py pylons/wsgiapp.py pylons/decorators/__init__.py pylons/decorators/rest.py pylons/i18n/__init__.py pylons/i18n/msgfmt.py pylons/i18n/pygettext.py pylons/i18n/translation.py pylons/media/img/bar-bg.png pylons/media/img/bg.jpg pylons/media/img/hatch-yellow.png pylons/media/img/header.png pylons/media/img/highlight.png pylons/media/img/icon-16.png pylons/media/img/logo.gif pylons/media/img/main-nav-bg-on.png pylons/media/img/main-nav-bg.png pylons/media/img/plus.jpg pylons/media/img/tab-brown.png pylons/media/img/tab-white.png pylons/media/img/tab-yellow-highlight.png pylons/media/img/tab-yellow.png pylons/media/img/warning.gif pylons/media/style/orange.css pylons/templates/__init__.py pylons/templates/controller.py_tmpl pylons/templates/test_controller.py_tmpl pylons/templates/paster_template/README.txt_tmpl pylons/templates/paster_template/development.ini_tmpl pylons/templates/paster_template/setup.cfg_tmpl pylons/templates/paster_template/setup.py_tmpl pylons/templates/paster_template/+egg+.egg-info/paste_deploy_config.ini_tmpl_tmpl pylons/templates/paster_template/+package+/__init__.py_tmpl pylons/templates/paster_template/+package+/websetup.py_tmpl pylons/templates/paster_template/+package+/config/__init__.py_tmpl pylons/templates/paster_template/+package+/config/environment.py_tmpl pylons/templates/paster_template/+package+/config/middleware.py_tmpl pylons/templates/paster_template/+package+/config/routing.py_tmpl pylons/templates/paster_template/+package+/controllers/__init__.py_tmpl pylons/templates/paster_template/+package+/controllers/error.py_tmpl pylons/templates/paster_template/+package+/controllers/template.py_tmpl pylons/templates/paster_template/+package+/docs/index.txt_tmpl pylons/templates/paster_template/+package+/i18n/__init__.py_tmpl pylons/templates/paster_template/+package+/lib/__init__.py_tmpl pylons/templates/paster_template/+package+/lib/app_globals.py_tmpl pylons/templates/paster_template/+package+/lib/base.py_tmpl pylons/templates/paster_template/+package+/lib/helpers.py_tmpl pylons/templates/paster_template/+package+/models/__init__.py_tmpl pylons/templates/paster_template/+package+/public/index.html_tmpl pylons/templates/paster_template/+package+/templates/autohandler pylons/templates/paster_template/+package+/tests/__init__.py_tmpl pylons/templates/paster_template/+package+/tests/test_models.py_tmpl pylons/templates/paster_template/+package+/tests/functional/__init__.py_tmpl tests/__init__.py tests/conftest.py tests/test_units/__init__.py tests/test_webapps/test_make_project.py tests/test_webapps/test_files/app_globals.py tests/test_webapps/test_files/controller_sample.py tests/test_webapps/test_files/development.ini tests/test_webapps/test_files/functional_sample_controller_sample1.py tests/test_webapps/test_files/functional_sample_controller_sample2.py tests/test_webapps/test_files/functional_sample_controller_sample3.py tests/test_webapps/test_files/functional_sample_controller_sample4.py tests/test_webapps/test_files/middleware_def_engine.py tests/test_webapps/test_files/middleware_two_engines.py tests/test_webapps/test_files/test_myghty.myt tests/test_webapps/test_files/testkid.kid PKÆ«'5zm\ EGG-INFO/top_level.txttests pylons PK®"5Þpíípylons/__init__.py"""Base objects to be exported for use in Controllers""" from paste.registry import StackedObjectProxy from paste.wsgiwrappers import WSGIResponse as Response from pylons.controllers import Controller, RPCController from pylons.decorators import jsonify from pylons.util import Helpers from pylons.legacy import m, params c = StackedObjectProxy(name="C") g = StackedObjectProxy(name="G") cache = StackedObjectProxy(name="Cache") session = StackedObjectProxy(name="Session") request = StackedObjectProxy(name="Request") buffet = StackedObjectProxy(name="Buffet") h = Helpers(c=c, session=session, request=request, buffet=buffet) translator = StackedObjectProxy(name="Translator") __all__ = ['Controller', 'RPCController', 'Response', 'jsonify'] PKÇ«'5›diBJJpylons/__init__.pyc;ò ¤^úDc @sdZdklZdklZdklZlZdk l Z dk l Z dk lZlZeddƒZedd ƒZedd ƒZedd ƒZedd ƒZedd ƒZe dedededeƒZeddƒZddddgZdS(s2Base objects to be exported for use in Controllers(sStackedObjectProxy(s WSGIResponse(s Controllers RPCController(sjsonify(sHelpers(smsparamssnamesCsGsCachesSessionsRequestsBuffetscssessionsrequestsbuffets Translators Controllers RPCControllersResponsesjsonifyN(s__doc__spaste.registrysStackedObjectProxyspaste.wsgiwrapperss WSGIResponsesResponsespylons.controllerss Controllers RPCControllerspylons.decoratorssjsonifys pylons.utilsHelperss pylons.legacysmsparamsscsgscachessessionsrequestsbuffetshs translators__all__(scscaches__all__sgsrequestsjsonifysmsbuffets translators ControllerssessionsHelperssparamss RPCControllersStackedObjectProxyshsResponse((s?build/bdist.darwin-8.7.0-Power_Macintosh/egg/pylons/__init__.pys?s    !PK-£'5÷%¸×B"B"pylons/commands.py"""Paster Commands, for use with paster in your project The command(s) listed here are for use with Paste to enable easy creation of various core Pylons templates. Currently available commands are:: controller, shell """ import os import os.path import sys import glob import pylons import pylons.util as util from paste.script.command import Command, BadCommand from paste.script.filemaker import FileOp from paste.script import pluginlib, copydir from paste.deploy import loadapp, appconfig import paste.deploy.config import paste.fixture class ControllerCommand(Command): """Create a Controller and functional test for it The Controller command will create the standard controller template file and associated functional test to speed creation of controllers. Example usage:: yourproj% paster controller comments Creating yourproj/yourproj/controllers/comments.py Creating yourproj/yourproj/tests/functional/test_comments.py If you'd like to have controllers underneath a directory, just include the path as the controller name and the necessary directories will be created for you:: yourproj% paster controller admin/trackback Creating yourproj/controllers/admin Creating yourproj/yourproj/controllers/admin/trackback.py Creating yourproj/yourproj/tests/functional/test_admin_trackback.py """ summary = __doc__ usage = 'CONTROLLER_NAME' min_args = 1 max_args = 1 group_name = 'pylons' default_verbosity = 3 parser = Command.standard_parser(simulate=True) parser.add_option('--no-test', action='store_true', dest='no_test', help="Don't create the test; just the controller") def validate_name(self, name): if not name: # This happens when the name is an existing directory raise BadCommand('Please give the name of a controller.') try: __import__(name) raise BadCommand("\n\nA module named '%s' is already present in your PYTHON_PATH.\n" "Choosing a conflicting name will likely cause import problems in\n" "your controller at some point. It's suggested that you choose an alternate\n" "name, and if you'd like that name to be accessible as '%s', add a route\n" "to your projects config/routing.py file similar to:\n" " map.connect('%s', controller='my_%s')" % (name, name, name, name)) except ImportError: # This is actually the result we want pass return True def command(self): try: fo = FileOp(source_dir=os.path.join(os.path.dirname(__file__), 'templates')) try: name, dir = fo.parse_path_name_args(self.args[0]) except: raise BadCommand('No egg_info directory was found') # Validate the name name = name.replace('-', '_') self.validate_name(name) fullname = os.path.join(dir, name) controller_name = util.class_name_from_module_name(name.split('/')[-1]) if not fullname.startswith(os.sep): fullname = os.sep + fullname testname = fullname.replace(os.sep, '_')[1:] fo.template_vars.update({'name': controller_name, 'fname': os.path.join(dir, name)}) fo.copy_file(template='controller.py_tmpl', dest=os.path.join('controllers', dir), filename=name) if not self.options.no_test: fo.copy_file(template='test_controller.py_tmpl', dest=os.path.join('tests', 'functional'), filename='test_'+testname) except: import sys msg = str(sys.exc_info()[1]) raise BadCommand('An unknown error ocurred, %s' % msg) class ShellCommand(Command): """Open an interactive shell with the Pylons app loaded The optional CONFIG_FILE argument specifies the config file to use for the interactive shell. CONFIG_FILE defaults to 'development.ini'. This allows you to test your mapper, models, and simulate web requests using ``paste.fixture``. Example:: $ paster shell my-development.ini """ summary = __doc__ usage = '[CONFIG_FILE]' min_args = 0 max_args = 1 group_name = 'pylons' parser = Command.standard_parser(simulate=True) def command(self): self.verbose = 3 if len(self.args) == 0: # Assume the .ini file is ./development.ini config_file = 'development.ini' if not os.path.isfile(config_file): raise BadCommand('%sError: CONFIG_FILE not found at: .%s%s\n' 'Please specify a CONFIG_FILE' % \ (self.parser.get_usage(), os.path.sep, config_file)) else: config_file = self.args[0] config_name = 'config:%s' % config_file here_dir = os.getcwd() locs = dict(__name__="pylons-admin") pkg_name = here_dir.split(os.path.sep)[-1].lower() # Load app config into paste.deploy to simulate request config app_conf = appconfig(config_name, relative_to=here_dir) conf = dict(app=app_conf, app_conf=app_conf) paste.deploy.config.CONFIG.push_thread_config(conf) # Load locals and populate with objects for use in shell sys.path.insert(0, here_dir) # Load the wsgi app first so that everything is initialized right wsgiapp = loadapp(config_name, relative_to=here_dir) # Start the rest of our imports now that the app is loaded routing_package = pkg_name + '.config.routing' models_package = pkg_name + '.models' helpers_package = pkg_name + '.lib.helpers' # Import all the modules for pack in [routing_package, models_package, helpers_package]: __import__(pack) make_map = getattr(sys.modules[routing_package], 'make_map') mapper = make_map() test_app = app=paste.fixture.TestApp(wsgiapp) g = None try: g = test_app.get('/').g except: pass locs.update( dict( model=sys.modules[models_package], mapper=mapper, wsgiapp=wsgiapp, app=test_app, h=sys.modules[helpers_package], ) ) if g: locs['g'] = g pylons.g.push_object(g) banner = "Pylons Interactive Shell\nPython %s\n\n" % sys.version banner += "Additional Objects:\n" banner += " %-10s - %s\n" % ('mapper', 'Routes mapper object') banner += " %-10s - %s\n" % ('h', 'Helper object') if g: banner += " %-10s - %s\n" % ('g', 'Globals object') banner += " %-10s - %s\n" % ('model', 'Models from models package') banner += " %-10s - %s\n" % ('wsgiapp', 'This projects WSGI App instance') banner += " %-10s - %s\n" % ('app', 'paste.fixture wrapped around wsgiapp') try: # try to use IPython if possible import IPython class CustomIPShell(IPython.iplib.InteractiveShell): def raw_input(self, *args, **kw): try: return IPython.iplib.InteractiveShell.raw_input(self, *args, **kw) except EOFError: # In the future, we'll put our own override as needed to save # models, TG style raise EOFError shell = IPython.Shell.IPShell(user_ns=locs, shell_class=CustomIPShell) shell.mainloop() except ImportError: import code class CustomShell(code.InteractiveConsole): def raw_input(self, *args, **kw): try: return code.InteractiveConsole.raw_input(self, *args, **kw) except EOFError: # In the future, we'll put our own override as needed to save # models, TG style raise EOFError shell = CustomShell(locals=locs) shell.interact(banner) PKÇ«'5dº1Z2&2&pylons/commands.pyc;ò ¦âEc@sÇdZdkZdkZdkZdkZdkZdkiZdkl Z l Z dk l Z dk lZlZdklZlZdkZdkZde fd„ƒYZde fd „ƒYZdS( sÝPaster Commands, for use with paster in your project The command(s) listed here are for use with Paste to enable easy creation of various core Pylons templates. Currently available commands are:: controller, shell N(sCommands BadCommand(sFileOp(s pluginlibscopydir(sloadapps appconfigsControllerCommandcBsutZdZeZdZdZdZdZdZe i de ƒZ e i dddd d d d ƒd „Zd„ZRS(s=Create a Controller and functional test for it The Controller command will create the standard controller template file and associated functional test to speed creation of controllers. Example usage:: yourproj% paster controller comments Creating yourproj/yourproj/controllers/comments.py Creating yourproj/yourproj/tests/functional/test_comments.py If you'd like to have controllers underneath a directory, just include the path as the controller name and the necessary directories will be created for you:: yourproj% paster controller admin/trackback Creating yourproj/controllers/admin Creating yourproj/yourproj/controllers/admin/trackback.py Creating yourproj/yourproj/tests/functional/test_admin_trackback.py sCONTROLLER_NAMEispylonsissimulates --no-testsactions store_truesdestsno_testshelps*Don't create the test; just the controllercCs`| otdƒ‚ny*t|ƒtd||||fƒ‚Wntj onXtSdS(Ns%Please give the name of a controller.sm A module named '%s' is already present in your PYTHON_PATH. Choosing a conflicting name will likely cause import problems in your controller at some point. It's suggested that you choose an alternate name, and if you'd like that name to be accessible as '%s', add a route to your projects config/routing.py file similar to: map.connect('%s', controller='my_%s')(snames BadCommands __import__s ImportErrorsTrue(sselfsname((s?build/bdist.darwin-8.7.0-Power_Macintosh/egg/pylons/commands.pys validate_name=s  c CsÌytdtiitiitƒdƒƒ}y |i|i dƒ\}}Wnt dƒ‚nX|i ddƒ}|i|ƒtii||ƒ}ti|idƒdƒ}|itiƒ oti|}n|i tidƒd }|iihd |<d tii||ƒ<ƒ|id d dtiid|ƒd|ƒ|ii o3|id ddtiiddƒdd|ƒnWn6dk}t|iƒd ƒ}t d|ƒ‚nXdS(Ns source_dirs templatesisNo egg_info directory was founds-s_s/iÿÿÿÿisnamesfnamestemplatescontroller.py_tmplsdests controllerssfilenamestest_controller.py_tmplstestss functionalstest_sAn unknown error ocurred, %s( sFileOpsosspathsjoinsdirnames__file__sfosparse_path_name_argssselfsargssnamesdirs BadCommandsreplaces validate_namesfullnamesutilsclass_name_from_module_namessplitscontroller_names startswithssepstestnames template_varssupdates copy_filesoptionssno_testssyssstrsexc_infosmsg( sselfssyssnamescontroller_namesmsgstestnamesfullnamesdirsfo((s?build/bdist.darwin-8.7.0-Power_Macintosh/egg/pylons/commands.pyscommandOs0*  1   (s__name__s __module__s__doc__ssummarysusagesmin_argssmax_argss group_namesdefault_verbositysCommandsstandard_parsersTruesparsers add_options validate_namescommand(((s?build/bdist.darwin-8.7.0-Power_Macintosh/egg/pylons/commands.pysControllerCommands    s ShellCommandcBsGtZdZeZdZdZdZdZei de ƒZ d„Z RS(s‚Open an interactive shell with the Pylons app loaded The optional CONFIG_FILE argument specifies the config file to use for the interactive shell. CONFIG_FILE defaults to 'development.ini'. This allows you to test your mapper, models, and simulate web requests using ``paste.fixture``. Example:: $ paster shell my-development.ini s [CONFIG_FILE]iispylonsssimulatec s`d|_t|iƒdjoJd}tii|ƒ o,td|i i ƒtii |fƒ‚qvn|id}d|}ti ƒ}tddƒ}|itii ƒdiƒ} t|d |ƒ} td | d | ƒ}tiiii|ƒtiid|ƒt|d |ƒ}| d } | d }| d}x!| ||gD]}t$|ƒqJWt%ti&| dƒ}|ƒ}ti)i*|ƒ}} t-}y|i/dƒi.}WnnX|i0tdti&|d|d|d |dti&|ƒƒ|o||d‰d#ˆi?f‡d$†ƒY} | d%|ƒ}|iA|ƒnXdS(&Niisdevelopment.inisE%sError: CONFIG_FILE not found at: .%s%s Please specify a CONFIG_FILEs config:%ss__name__s pylons-adminiÿÿÿÿs relative_tosappsapp_confs.config.routings.modelss .lib.helperssmake_maps/smodelsmapperswsgiappshsgs$Pylons Interactive Shell Python %s sAdditional Objects: s %-10s - %s sRoutes mapper objects Helper objectsGlobals objectsModels from models packagesThis projects WSGI App instances$paste.fixture wrapped around wsgiapps CustomIPShellcstZ‡d†ZRS(Ncs=yˆiii|||ŽSWntj o t‚nXdS(N(sIPythonsiplibsInteractiveShells raw_inputsselfsargsskwsEOFError(sselfsargsskw(sIPython(s?build/bdist.darwin-8.7.0-Power_Macintosh/egg/pylons/commands.pys raw_inputÍs(s__name__s __module__s raw_input((sIPython(s?build/bdist.darwin-8.7.0-Power_Macintosh/egg/pylons/commands.pys CustomIPShellÌssuser_nss shell_classs CustomShellcstZ‡d†ZRS(Ncs:yˆii|||ŽSWntj o t‚nXdS(N(scodesInteractiveConsoles raw_inputsselfsargsskwsEOFError(sselfsargsskw(scode(s?build/bdist.darwin-8.7.0-Power_Macintosh/egg/pylons/commands.pys raw_inputÛs(s__name__s __module__s raw_input((scode(s?build/bdist.darwin-8.7.0-Power_Macintosh/egg/pylons/commands.pys CustomShellÚsslocals(Bsselfsverboseslensargss config_filesosspathsisfiles BadCommandsparsers get_usagesseps config_namesgetcwdshere_dirsdictslocsssplitslowerspkg_names appconfigsapp_confsconfspastesdeploysconfigsCONFIGspush_thread_configssyssinsertsloadappswsgiappsrouting_packagesmodels_packageshelpers_packagespacks __import__sgetattrsmodulessmake_mapsmappersfixturesTestAppstest_appsappsNonesgsgetsupdatespylonss push_objectsversionsbannersIPythonsiplibsInteractiveShells CustomIPShellsShellsIPShellsshellsmainloops ImportErrorscodesInteractiveConsoles CustomShellsinteract(sselfscodestest_appswsgiappslocssconfsIPythonsmodels_packageshelpers_packagesapp_confspkg_namesrouting_packagesapps CustomShells CustomIPShellsshells config_filesmappers config_namesgshere_dirsbannersmake_mapspack((scodesIPythons?build/bdist.darwin-8.7.0-Power_Macintosh/egg/pylons/commands.pyscommand‚sp 0              ( s__name__s __module__s__doc__ssummarysusagesmin_argssmax_argss group_namesCommandsstandard_parsersTruesparserscommand(((s?build/bdist.darwin-8.7.0-Power_Macintosh/egg/pylons/commands.pys ShellCommandls (s__doc__sossos.pathssyssglobspylonss pylons.utilsutilspaste.script.commandsCommands BadCommandspaste.script.filemakersFileOps paste.scripts pluginlibscopydirs paste.deploysloadapps appconfigspaste.deploy.configspastes paste.fixturesControllerCommands ShellCommand(sutilspylonss pluginlibspastesglobs ShellCommandsControllerCommandsFileOpssyssloadappscopydirsCommands appconfigsoss BadCommand((s?build/bdist.darwin-8.7.0-Power_Macintosh/egg/pylons/commands.pys? s         TPK¬¢'5ð”hY%Y%pylons/config.py"""Configuration setup for Myghty, and Paste error middleware This module supplies pylons_config which handles setting up defaults for Myghty, Paste errorware, and prefixing Routes if necessary. """ import os from paste.deploy.converters import asbool class Config(object): """Pylons configuration object The Pylons configuration object is a per-application instance object that retains the information regarding the global and app conf's as well as per-application instance specific data such as the mapper, the paths for this instance, and the myghty configuration. The Config object is available in your application as a Pylons global ``pylons_config`` under the ``g`` object. There's several useful attributes of the config object most people will be interested in: ``myghty`` The myghty configuration dict that was used to initialize Myghty ``map`` Mapper object used for Routing. Yes, it is possible to add routes after your application has started running. ``paths`` An array of absolute paths that were defined in the applications ``config/environment.py`` module. ``global_conf`` Global configuration passed in from Paste, this corresponds to the DEFAULTS section in the config file. ``app_conf`` Application specific configuration directives, passed in via Paste from the app section of the config file. ``environ_config`` Dict of environ keys for where in the environ to pickup various objects for registering with Pylons. If these are present then PylonsApp will use them from environ rather than using default middleware from Beaker. Valid keys are: ``session, cache`` ``template_engines`` List of template engines to configure. The first one in the list will be configured as the default template engine. Each item in the list is a dict indicating how to configure the template engine with keys: ``engine``, ``template_root``, ``template_options``, and ``alias`` ``default_charset`` The default character encoding specified to the browser via the 'charset' parameter of the HTTP response's Content-Type header. ``strict_c`` Whether or not the ``c`` object should throw an attribute error when access is attempted to an attribute that doesn't exist. """ def __init__(self, myghty, map, paths, environ_config=None, default_charset='UTF-8', strict_c=False): if environ_config is None: environ_config = {} self.myghty = myghty self.map = map self.paths = paths self.environ_config = environ_config self.default_charset = default_charset self.strict_c = strict_c if 'output_encoding' not in myghty: myghty['output_encoding'] = default_charset self.global_conf = {} self.app_conf = {} self.template_engines = [] def add_template_engine(self, engine, root, options, alias=None): """Add additional template engines for configuration on Pylons WSGI init ``engine`` The name of the template engine ``root`` Template root for the engine ``options`` Dict of additional options used during engine initialization ``alias`` Name engine should respond to when actually used. This allows for multiple configurations of the same engine and lets you alias the additional ones to other names. Example of Kid addition: .. code-block:: Python # In yourproj/middleware.py # ... config.init_app(global_conf, app_conf, package='yourproj') # Load additional template engines kidopts = {'kid.assume_encoding':'utf-8', 'kid.encoding':'utf-8'} config.add_template_engine('kid', 'yourproj.kidtemplates', kidopts) Example of changing the default template engine: .. code-block:: Python # In yourproj/middleware.py # ... config.init_app(global_conf, app_conf, package='yourproj') # Remove existing template engine old_default = config.template_engines.pop() # Load additional template engines kidopts = {'kid.assume_encoding':'utf-8', 'kid.encoding':'utf-8'} config.add_template_engine('kid', 'yourproj.kidtemplates', kidopts) # Add old default as additional engine config.template_engines.append(old_default) """ config = dict(engine=engine, template_root=root, template_options=options, alias=alias) self.template_engines.append(config) def init_app(self, global_conf, app_conf, package): """Initialize configuration for the application ``global_config`` Several options are expected to be set for a Pylons web application. They will be loaded from the global_config which has the main Paste options. If ``debug`` is not enabled as a global config option, the following option *must* be set: * error_to - The email address to send the debug error to The optional config options in this case are: * smtp_server - The SMTP server to use, defaults to 'localhost' * error_log - A logfile to write the error to * error_subject_prefix - The prefix of the error email subject * from_address - Whom the error email should be from ``app_conf`` Defaults supplied via the [app:main] section from the Paste config file. ``load_config`` only cares about whether a 'prefix' option is set, if so it will update Routes to ensure URL's take that into account. ``package`` The name of the application package, to be stored in the app_conf. """ self.global_conf = global_conf self.app_conf = app_conf self.package = package app_conf['package'] = package # Setup the prefix to override the routes if necessary. prefix = app_conf.get('prefix') if not prefix: prefix = global_conf.get('prefix') if prefix: self.map.prefix = app_conf['prefix'] self.map._created_regs = False errorware = {} # Load the errorware configuration from the Paste configuration file # These all have defaults, and emails are only sent if configured and # if this application is running in production mode errorware['debug'] = asbool(global_conf.get('debug')) if not errorware['debug']: errorware['debug'] = False errorware['error_email'] = global_conf.get('email_to') errorware['error_log'] = global_conf.get('error_log', None) errorware['smtp_server'] = global_conf.get('smtp_server', 'localhost') errorware['error_subject_prefix'] = global_conf.get('error_subject_prefix', 'WebApp Error: ') errorware['from_address'] = global_conf.get('from_address', global_conf.get('error_email_from', 'pylons@yourapp.com')) errorware['error_message'] = global_conf.get('error_message', 'An internal server error occurred') # Standard Pylons configuration directives for Myghty myghty_defaults = {} # Raise a complete error for the error middleware to catch myghty_defaults['raise_error'] = True myghty_defaults['component_root'] = [{os.path.basename(path): path} for \ path in self.paths['templates']] # Merge in the user-supplied Myghty values myghty_defaults.update(self.myghty) # Merge additional globals myghty_defaults.setdefault('allow_globals', []) myghty_defaults['allow_globals'].extend( ['c', 'h', 's', 'session', 'request', 'params', 'g', 'render', 'render_fragment'] ) self.myghty = myghty_defaults myghty_template_options = {} if app_conf.get('cache_dir', False): myghty_defaults['data_dir'] = os.path.join(app_conf['cache_dir'], 'templates') else: myghty_defaults['data_dir'] = app_conf['myghty_data_dir'] # Copy Myghty defaults and options into template options for k, v in self.myghty.iteritems(): myghty_template_options['myghty.'+k] = v # Legacy copy of session and cache settings into app_conf if k.startswith('session_') or k.startswith('cache_'): self.app_conf[k] = v if not app_conf.has_key('session_data_dir'): app_conf['session_data_dir'] = os.path.join(app_conf['cache_dir'], 'sessions') if not app_conf.has_key('cache_data_dir'): app_conf['cache_data_dir'] = os.path.join(app_conf['cache_dir'], 'cache') # Prepare our default template engine self.add_template_engine('pylonsmyghty', None, myghty_template_options) # Save our errorware values self.errorware = errorware PKÇ«'5‰ö×–)#)#pylons/config.pyc;ò ´áEc@s6dZdkZdklZdefd„ƒYZdS(sÁConfiguration setup for Myghty, and Paste error middleware This module supplies pylons_config which handles setting up defaults for Myghty, Paste errorware, and prefixing Routes if necessary. N(sasboolsConfigcBs5tZdZeded„Zed„Zd„ZRS(s^Pylons configuration object The Pylons configuration object is a per-application instance object that retains the information regarding the global and app conf's as well as per-application instance specific data such as the mapper, the paths for this instance, and the myghty configuration. The Config object is available in your application as a Pylons global ``pylons_config`` under the ``g`` object. There's several useful attributes of the config object most people will be interested in: ``myghty`` The myghty configuration dict that was used to initialize Myghty ``map`` Mapper object used for Routing. Yes, it is possible to add routes after your application has started running. ``paths`` An array of absolute paths that were defined in the applications ``config/environment.py`` module. ``global_conf`` Global configuration passed in from Paste, this corresponds to the DEFAULTS section in the config file. ``app_conf`` Application specific configuration directives, passed in via Paste from the app section of the config file. ``environ_config`` Dict of environ keys for where in the environ to pickup various objects for registering with Pylons. If these are present then PylonsApp will use them from environ rather than using default middleware from Beaker. Valid keys are: ``session, cache`` ``template_engines`` List of template engines to configure. The first one in the list will be configured as the default template engine. Each item in the list is a dict indicating how to configure the template engine with keys: ``engine``, ``template_root``, ``template_options``, and ``alias`` ``default_charset`` The default character encoding specified to the browser via the 'charset' parameter of the HTTP response's Content-Type header. ``strict_c`` Whether or not the ``c`` object should throw an attribute error when access is attempted to an attribute that doesn't exist. sUTF-8cCs‡|tjo h}n||_||_||_||_||_||_d|jo||dtZdZed„Zd„Zd„Zd„Zd„ZRS(s|Transparently proxies to an AutoConnectHub for the URI that is appropriate for this package. A package URI is configured via "packagename.dburi" in the global CherryPy settings. If there is no package DB URI configured, the default (provided by "sqlobject.dburi") is used. The hub is not instantiated until an attempt is made to use the database. cCs||_t|_||_dS(N(s packagenamesselfsNoneshubsdburi(sselfs packagenamesdburi((s?build/bdist.darwin-8.7.0-Power_Macintosh/egg/pylons/database.pys__init__gs  cCs0|i o|iƒn|ii||ƒSdS(N(sselfshubsset_hubs__get__sobjstype(sselfsobjstype((s?build/bdist.darwin-8.7.0-Power_Macintosh/egg/pylons/database.pys__get__ls cCs0|i o|iƒn|ii||ƒSdS(N(sselfshubsset_hubs__set__sobjstype(sselfsobjstype((s?build/bdist.darwin-8.7.0-Power_Macintosh/egg/pylons/database.pys__set__qs cCs-|i o|iƒnt|i|ƒSdS(N(sselfshubsset_hubsgetattrsname(sselfsname((s?build/bdist.darwin-8.7.0-Power_Macintosh/egg/pylons/database.pys __getattr__vs cCsÉ|i}| obtiƒ}|id|idƒƒ}|id|itƒ}| o|idtƒ}qsn| o t d‚nt i|tƒ}| ot |ƒ}|t |>> def f(self, x=1, y=2, *args, **kw): pass >>> info = getinfo(f) >>> info["name"] 'f' >>> info["argnames"] ['self', 'x', 'y', 'args', 'kw'] >>> info["defarg"] (1, 2) >>> info["shortsign"] 'self, x, y, *args, **kw' >>> info["fullsign"] 'self, x=defarg[0], y=defarg[1], *args, **kw' >>> info["arg0"], info["arg1"], info["arg2"], info["arg3"], info["arg4"] ('self', 'x', 'y', 'args', 'kw') """ assert inspect.ismethod(func) or inspect.isfunction(func) regargs, varargs, varkwargs, defaults = inspect.getargspec(func) argnames = list(regargs) if varargs: argnames.append(varargs) if varkwargs: argnames.append(varkwargs) counter = itertools.count() fullsign = inspect.formatargspec( regargs, varargs, varkwargs, defaults, formatvalue=lambda value: "=defarg[%i]" % counter.next())[1:-1] shortsign = inspect.formatargspec( regargs, varargs, varkwargs, defaults, formatvalue=lambda value: "")[1:-1] dic = dict([("arg%s" % n, name) for n, name in enumerate(argnames)]) dic.update(name=func.__name__, argnames=argnames, shortsign=shortsign, fullsign = fullsign, defarg = func.func_defaults or ()) return dic def _contains_reserved_names(dic): # helper return "_call_" in dic or "_func_" in dic def _decorate(func, caller, infodict=None): """Takes a function and a caller and returns the function decorated with that caller. The decorated function is obtained by evaluating a function with the correct signature. """ infodict = infodict or getinfo(func) assert not _contains_reserved_names(infodict["argnames"]), \ "You cannot use _call_ or _func_ as argument names!" execdict= dict(_func_=func, _call_=caller, defarg=infodict["defarg"]) if infodict['name'] == "": lambda_src = "lambda %(fullsign)s: _call_(_func_, %(shortsign)s)" \ % infodict dec_func = eval(lambda_src, execdict) else: func_src = """def %(name)s(%(fullsign)s): return _call_(_func_, %(shortsign)s)""" % infodict # import sys; print >> sys.stderr, func_src # for debugging exec func_src in execdict dec_func = execdict[infodict['name']] dec_func.__doc__ = func.__doc__ dec_func.__dict__ = func.__dict__ dec_func.__module__ = func.__module__ return dec_func class decorator(object): """General purpose decorator factory: takes a caller function as input and returns a decorator. A caller function is any function like this:: def caller(func, *args, **kw): # do something return func(*args, **kw) Here is an example of usage: >>> @decorator ... def chatty(f, *args, **kw): ... print "Calling %r" % f.__name__ ... return f(*args, **kw) >>> @chatty ... def f(): pass ... >>> f() Calling 'f' """ def __init__(self, caller): self.caller = caller def __call__(self, func): if sys.version < '2.4': # gracefull fallback return lambda *args, **kw : self.caller(func, *args, **kw) else: return _decorate(func, self.caller) def newfunc(func, model=None): # not used internally """Creates an independent copy of a function. If model is not None, the new function copies the signature, as well the attributes __name__, __doc__, __dict__ and __module__ from the model, which must be a compatible function. Here is an example of usage: >>> def f(*args, **kw): ... return args[0]*2 >>> def double(x): ... pass >>> help(change_signature(f, double)) Help on function double in module __main__: double(x) """ if model is None: return new.function(func.func_code, func.func_globals, func.func_name, func.func_defaults, func.func_closure) else: return _decorate(func, lambda f, *a, **kw : f(*a,**kw), getinfo(model)) PKÇ«'5,â> ——pylons/decorator.pyc;ò FcÝDc@s}dZdddgZdkZdkZdkZdkZd„Zd„Zed„Z de fd„ƒYZ ed „Z dS( sêDecorator module Author: Michele Simionato E-mail: michele.simionato@gmail.com Version: 0.7 License: Python license For more details, see: http://www.phyast.pitt.edu/~micheles/python/documentation.html s decoratorsnewfuncsgetinfoNc s]ti|ƒp ti|ƒpt‚ti|ƒ\} } }}t | ƒ}| o|i | ƒn|o|i |ƒnt iƒ‰ti| | ||d‡d†ƒdd!}ti| | ||dd„ƒdd!}tgi }t|ƒD] \} } |d| | fƒqô~ƒ}|id|id|d |d |d |ipfƒ|Sd S( s$Return an info dictionary containing: - name (the name of the function : str) - argnames (the names of the arguments : list) - defarg (the values of the default arguments : list) - fullsign (the full signature : str) - shortsign (the short signature : str) - arg0 ... argn (shortcuts for the names of the arguments) >>> def f(self, x=1, y=2, *args, **kw): pass >>> info = getinfo(f) >>> info["name"] 'f' >>> info["argnames"] ['self', 'x', 'y', 'args', 'kw'] >>> info["defarg"] (1, 2) >>> info["shortsign"] 'self, x, y, *args, **kw' >>> info["fullsign"] 'self, x=defarg[0], y=defarg[1], *args, **kw' >>> info["arg0"], info["arg1"], info["arg2"], info["arg3"], info["arg4"] ('self', 'x', 'y', 'args', 'kw') s formatvaluecsdˆiƒS(Ns =defarg[%i](scountersnext(svalue(scounter(s@build/bdist.darwin-8.7.0-Power_Macintosh/egg/pylons/decorator.pys6siiÿÿÿÿcCsdS(Ns((svalue((s@build/bdist.darwin-8.7.0-Power_Macintosh/egg/pylons/decorator.pys9ssarg%ssnamesargnamess shortsignsfullsignsdefargN(sinspectsismethodsfuncs isfunctionsAssertionErrors getargspecsregargssvarargss varkwargssdefaultsslistsargnamessappends itertoolsscountscounters formatargspecsfullsigns shortsignsdicts_[1]s enumeratesnsnamesdicsupdates__name__s func_defaults( sfuncscountersfullsigns shortsignsargnamessdics_[1]s varkwargssdefaultssvarargssnsregargssname((scounters@build/bdist.darwin-8.7.0-Power_Macintosh/egg/pylons/decorator.pysgetinfos"'  CcCsd|jp d|jSdS(Ns_call_s_func_(sdic(sdic((s@build/bdist.darwin-8.7.0-Power_Macintosh/egg/pylons/decorator.pys_contains_reserved_names?scBsÈ|p e|ƒ}e|dƒ p td‚ed|d|d|dƒ}|ddjod|}e ||ƒ}n!d |}||U||d}|i |_ |i |_ |i|_|Sd S( s·Takes a function and a caller and returns the function decorated with that caller. The decorated function is obtained by evaluating a function with the correct signature. sargnamess2You cannot use _call_ or _func_ as argument names!s_func_s_call_sdefargsnamess2lambda %(fullsign)s: _call_(_func_, %(shortsign)s)sHdef %(name)s(%(fullsign)s): return _call_(_func_, %(shortsign)s)N(sinfodictsgetinfosfuncs_contains_reserved_namessAssertionErrorsdictscallersexecdicts lambda_srcsevalsdec_funcsfunc_srcs__doc__s__dict__s __module__(sfuncscallersinfodictsexecdictsfunc_srcs lambda_srcsdec_func((s@build/bdist.darwin-8.7.0-Power_Macintosh/egg/pylons/decorator.pys _decorateBs     cBs tZdZd„Zd„ZRS(sâGeneral purpose decorator factory: takes a caller function as input and returns a decorator. A caller function is any function like this:: def caller(func, *args, **kw): # do something return func(*args, **kw) Here is an example of usage: >>> @decorator ... def chatty(f, *args, **kw): ... print "Calling %r" % f.__name__ ... return f(*args, **kw) >>> @chatty ... def f(): pass ... >>> f() Calling 'f' cCs ||_dS(N(scallersself(sselfscaller((s@build/bdist.darwin-8.7.0-Power_Macintosh/egg/pylons/decorator.pys__init__oscs5tidjo‡‡d†SntˆˆiƒSdS(Ns2.4csˆiˆ||ŽS(N(sselfscallersfuncsargsskw(sargsskw(sselfsfunc(s@build/bdist.darwin-8.7.0-Power_Macintosh/egg/pylons/decorator.pysss(ssyssversions _decoratesfuncsselfscaller(sselfsfunc((sselfsfuncs@build/bdist.darwin-8.7.0-Power_Macintosh/egg/pylons/decorator.pys__call__qs(s__name__s __module__s__doc__s__init__s__call__(((s@build/bdist.darwin-8.7.0-Power_Macintosh/egg/pylons/decorator.pys decoratorZs  cCsV|tjo,ti|i|i|i|i|i ƒSnt |d„t |ƒƒSdS(sCreates an independent copy of a function. If model is not None, the new function copies the signature, as well the attributes __name__, __doc__, __dict__ and __module__ from the model, which must be a compatible function. Here is an example of usage: >>> def f(*args, **kw): ... return args[0]*2 >>> def double(x): ... pass >>> help(change_signature(f, double)) Help on function double in module __main__: double(x) cOs |||ŽS(N(sfsaskw(sfsaskw((s@build/bdist.darwin-8.7.0-Power_Macintosh/egg/pylons/decorator.pyssN( smodelsNonesnewsfunctionsfuncs func_codes func_globalss func_names func_defaultss func_closures _decoratesgetinfo(sfuncsmodel((s@build/bdist.darwin-8.7.0-Power_Macintosh/egg/pylons/decorator.pysnewfuncws   ( s__doc__s__all__sinspectsnews itertoolsssyssgetinfos_contains_reserved_namessNones _decoratesobjects decoratorsnewfunc( s__all__sgetinfosinspectssyss itertoolss _decorates_contains_reserved_namessnews decoratorsnewfunc((s@build/bdist.darwin-8.7.0-Power_Macintosh/egg/pylons/decorator.pys? s$ /  PK“± 5¶?˜™S™Spylons/error.py"""Custom error middleware subclasses, used for error theme These error middleware sub-classes are used mainly to provide skinning for the Paste middleware. In the future this entire module will likely be little more than a template, as Paste will get the skinning functionality. The only additional thing besides skinning supplied, is the Myghty traceback information. """ __all__ = [] import cgi from pylons.util import get_prefix import myghty.exception, sys from paste.evalexception.middleware import * from paste.exceptions.formatter import * class Supplement(errormiddleware.Supplement): """This is a supplement used to display standard WSGI information in the traceback. """ def extraData(self): data = {} cgi_vars = data[('extra', 'CGI Variables')] = {} wsgi_vars = data[('extra', 'WSGI Variables')] = {} hide_vars = ['paste.config', 'wsgi.errors', 'wsgi.input', 'wsgi.multithread', 'wsgi.multiprocess', 'wsgi.run_once', 'wsgi.version', 'wsgi.url_scheme'] for name, value in self.environ.items(): if name.upper() == name: if value: cgi_vars[name] = value elif name not in hide_vars: wsgi_vars[name] = value if self.environ['wsgi.version'] != (1, 0): wsgi_vars['wsgi.version'] = self.environ['wsgi.version'] proc_desc = tuple([int(bool(self.environ[key])) for key in ('wsgi.multiprocess', 'wsgi.multithread', 'wsgi.run_once')]) wsgi_vars['wsgi process'] = self.process_combos[proc_desc] wsgi_vars['application'] = self.middleware.application if 'paste.config' in self.environ: data[('extra', 'Configuration')] = dict(self.environ['paste.config']) # Add any extra sections here return data class HTMLFormatter(formatter.HTMLFormatter): def format_collected_data(self, exc_data): general_data = {} if self.show_extra_data: for name, value_list in exc_data.extra_data.items(): if isinstance(name, tuple): importance, title = name else: importance, title = 'normal', name for value in value_list: general_data[(importance, name)] = self.format_extra_data( importance, title, value) lines = [] frames = self.filter_frames(exc_data.frames) for frame in frames: sup = frame.supplement if sup: if sup.object: general_data[('important', 'object')] = self.format_sup_object( sup.object) if sup.source_url: general_data[('important', 'source_url')] = self.format_sup_url( sup.source_url) if sup.line: lines.append(self.format_sup_line_pos(sup.line, sup.column)) if sup.expression: lines.append(self.format_sup_expression(sup.expression)) if sup.warnings: for warning in sup.warnings: lines.append(self.format_sup_warning(warning)) if sup.info: lines.extend(self.format_sup_info(sup.info)) if frame.supplement_exception: lines.append('Exception in supplement:') lines.append(self.quote_long(frame.supplement_exception)) if frame.traceback_info: lines.append(self.format_traceback_info(frame.traceback_info)) filename = frame.filename if filename and self.trim_source_paths: for path, repl in self.trim_source_paths: if filename.startswith(path): filename = repl + filename[len(path):] break lines.append(self.format_source_line(filename or '?', frame)) source = frame.get_source_line() long_source = frame.get_source_line(2) if source: lines.append(self.format_long_source( source, long_source)) exc_info = self.format_exception_info( exc_data.exception_type, exc_data.exception_value) data_by_importance = {'important': [], 'normal': [], 'supplemental': [], 'extra': []} for (importance, name), value in general_data.items(): data_by_importance[importance].append( (name, value)) for value in data_by_importance.itervalues(): value.sort() return self.format_combine(data_by_importance, lines, exc_info) def format_extra_data(self, importance, title, value): if isinstance(value, str): s = self.pretty_string_repr(value) if '\n' in s: return '%s:
%s
' % (title, self.quote(s)) else: return '%s: %s' % (title, self.quote(s)) elif isinstance(value, dict): return self.zebra_table(title, value) elif (isinstance(value, (list, tuple)) and self.long_item_list(value)): return '%s: [
\n    %s]
' % ( title, ',
    '.join(map(self.quote, map(repr, value)))) else: return '%s: %s' % (title, self.quote(repr(value))) def zebra_table(self, title, rows, table_class="variables"): if isinstance(rows, dict): rows = rows.items() rows.sort() table = ['' % table_class, '' % self.quote(title)] odd = False for name, value in rows: try: value = repr(value) except Exception, e: value = 'Cannot print: %s' % e odd = not odd table.append( '' % (odd and 'odd' or 'even', self.quote(name))) table.append( '' % make_wrappable(self.quote(value))) table.append('
%s
%s%s
') return '\n'.join(table) def format_combine(self, data_by_importance, lines, exc_info): lines[:0] = [value for n, value in data_by_importance['important']] lines.append(exc_info) for name in 'normal', 'supplemental': lines.extend([value for n, value in data_by_importance[name]]) extra_data = [] if data_by_importance['extra']: #extra_data.append( # '\n' + # '
\n') extra_data.extend([value for n, value in data_by_importance['extra']]) #extra_data.append('
') extra_data_text = self.format_combine_lines(extra_data) text = self.format_combine_lines(lines) if self.include_reusable: return str(error_css + hide_display_js + text), extra_data else: # Usually because another error is already on this page, # and so the js & CSS are unneeded return text, extra_data class InvalidTemplate(Exception): pass class PylonsEvalException(EvalException): def __init__(self, application, global_conf=None, xmlhttp_key=None, error_template=error_template, **errorparams): self.application = application self.error_template=error_template self.debug_infos = {} if xmlhttp_key is None: if global_conf is None: xmlhttp_key = '_' else: xmlhttp_key = global_conf.get('xmlhttp_key', '_') self.xmlhttp_key = xmlhttp_key self.errorparams = errorparams self.errorparams['debug_mode'] = self.errorparams['debug'] del self.errorparams['debug'] for s in ['head','traceback_data','extra_data','myghty_data']: if "%("+s+")s" not in self.error_template: raise InvalidTemplate("Could not find %s in template"%("%("+s+")s")) try: error_template%{'head': '', 'traceback_data': '', 'extra_data':'', 'myghty_data':'', 'set_tab':'', 'prefix':''} except: raise Exception('Invalid template. Please ensure all % signs are properly ' 'quoted as %% and no extra substitution strings are present.') def respond(self, environ, start_response): if environ.get('paste.throw_errors'): return self.application(environ, start_response) base_path = request.construct_url(environ, with_path_info=False, with_query_string=False) environ['paste.throw_errors'] = True started = [] def detect_start_response(status, headers, exc_info=None): try: return start_response(status, headers, exc_info) except: raise else: started.append(True) try: __traceback_supplement__ = Supplement, self, environ app_iter = self.application(environ, detect_start_response) try: return_iter = list(app_iter) return return_iter finally: if hasattr(app_iter, 'close'): app_iter.close() except: exc_info = sys.exc_info() for expected in environ.get('paste.expected_exceptions', []): if isinstance(exc_info[1], expected): raise count = debug_counter.next() view_uri = self.make_view_url(environ, base_path, count) if not started: headers = [('content-type', 'text/html')] headers.append(('X-Debug-URL', view_uri)) start_response('500 Internal Server Error', headers, exc_info) environ['wsgi.errors'].write('Debug at: %s\n' % view_uri) exc_data = collector.collect_exception(*exc_info) #debug_info = PylonsDebugInfo(count, exc_info, exc_data, base_path, debug_info = PylonsDebugInfo(count, exc_info, exc_data, get_prefix(environ), environ, view_uri, error_template) assert count not in self.debug_infos self.debug_infos[count] = debug_info if self.xmlhttp_key: get_vars = wsgilib.parse_querystring(environ) if dict(get_vars).get(self.xmlhttp_key): exc_data = collector.collect_exception(*exc_info) html = formatter.format_html( exc_data, include_hidden_frames=False, include_reusable=False, show_extra_data=False) return [html] # @@: it would be nice to deal with bad content types here return debug_info.content() class PylonsDebugInfo(DebugInfo): def __init__(self, counter, exc_info, exc_data, base_path, environ, view_uri, error_template): DebugInfo.__init__(self, counter, exc_info, exc_data, base_path, environ, view_uri) self.error_template = error_template def content(self): html, extra_data = format_eval_html(self.exc_data, self.base_path, self.counter) head_html = (formatter.error_css + formatter.hide_display_js) head_html += self.eval_javascript(self.counter) repost_button = make_repost_button(self.environ) myghty_data = '

No Myghty information available.

' tab = 'traceback_data' if hasattr(self.exc_value, 'htmlformat'): myghty_data = self.exc_value.htmlformat()[333:-14] tab = 'myghty_data' if hasattr(self.exc_value, 'mtrace'): myghty_data = self.exc_value.mtrace.htmlformat()[333:-14] tab = 'myghty_data' head_html = (error_head_template % {'prefix':self.base_path}) + head_html traceback_data = error_traceback_template % { 'prefix':self.base_path, 'body':html, 'repost_button': repost_button or '', } extra_data = """

Extra Data

""" + \ '\n'.join(extra_data) page = self.error_template % { 'head': head_html, 'traceback_data': traceback_data, 'extra_data':extra_data, 'myghty_data':myghty_data.replace('

', '

').replace('

', ''), 'set_tab':tab, 'prefix':self.base_path, } return [page] def eval_javascript(self, counter): base_path = self.base_path + '/_debug' return ( '\n' '\n' '\n' % (base_path, base_path, base_path, counter)) class EvalHTMLFormatter(HTMLFormatter): def __init__(self, base_path, counter, **kw): super(EvalHTMLFormatter, self).__init__(**kw) self.base_path = base_path self.counter = counter def format_source_line(self, filename, frame): line = formatter.HTMLFormatter.format_source_line( self, filename, frame) return (line + '     ' '    ' % (frame.tbid, self.base_path)) def format_eval_html(exc_data, base_path, counter): short_formatter = EvalHTMLFormatter( base_path=base_path, counter=counter, include_reusable=False) short_er, extra_data = short_formatter.format_collected_data(exc_data) long_formatter = EvalHTMLFormatter( base_path=base_path, counter=counter, show_hidden_frames=True, show_extra_data=False, include_reusable=False) long_er, extra_data_none = long_formatter.format_collected_data(exc_data) text_er = formatter.format_text(exc_data, show_hidden_frames=True) if short_formatter.filter_frames(exc_data.frames) != \ long_formatter.filter_frames(exc_data.frames): # Only display the full traceback when it differs from the # short version full_traceback_html = """
%s
""" % long_er else: full_traceback_html = '' return """ %s
%s
""" % (short_er, full_traceback_html, cgi.escape(text_er)), extra_data error_template = '''\ Server Error %(head)s

Pylons


%(extra_data)s
%(myghty_data)s
%(traceback_data)s


The Pylons Team | Top
''' error_head_template = """ """ error_traceback_template = """

Error Traceback

%(body)s
Extra Features
>>Display the lines of code near each part of the traceback
Show a debug prompt to allow you to directly debug the code at the traceback
%(repost_button)s""" PKÇ«'5nèMYMYpylons/error.pyc;ò FcÝDc@sëdZgZdkZdklZdkZdkZdkTdk Tde i fd„ƒYZ de i fd„ƒYZ defd „ƒYZd efd „ƒYZd efd „ƒYZde fd„ƒYZd„ZdZdZdZdS(sqCustom error middleware subclasses, used for error theme These error middleware sub-classes are used mainly to provide skinning for the Paste middleware. In the future this entire module will likely be little more than a template, as Paste will get the skinning functionality. The only additional thing besides skinning supplied, is the Myghty traceback information. N(s get_prefix(s*s SupplementcBstZdZd„ZRS(sYThis is a supplement used to display standard WSGI information in the traceback. c Cs…h} h}| ddf
%s
s%s: %ss$%s: [
    %s]
s,
    (s isinstancesvaluesstrsselfspretty_string_reprssstitlesquotesdicts zebra_tablesliststupleslong_item_listsjoinsmapsrepr(sselfs importancestitlesvaluess((s<build/bdist.darwin-8.7.0-Power_Macintosh/egg/pylons/error.pysformat_extra_dataps &0s variablesc Cs t|tƒo|iƒ}|iƒnd|d|i|ƒg}t }x›|D]“\}}yt|ƒ}Wntj o}d|}nX| }|id|odpd|i|ƒfƒ|idt|i|ƒƒƒqTW|idƒd i|ƒSdS( Nss/sCannot print: %sssoddsevenss
%s
%s%s
s (s isinstancesrowssdictsitemsssorts table_classsselfsquotestitlestablesFalsesoddsnamesvaluesreprs Exceptionsesappendsmake_wrappablesjoin( sselfstitlesrowss table_classsnamesvaluestablesoddse((s<build/bdist.darwin-8.7.0-Power_Macintosh/egg/pylons/error.pys zebra_table€s   .$ c Cs0gi}|dD]\}}||ƒq~|d*|i|ƒxLddfD]>}|igi}||D]\}}||ƒqm~ƒqOWg} |do<| igi}|dD]\}}||ƒqº~ƒn|i | ƒ} |i |ƒ}|iottt|ƒ| fSn || fSdS(Ns importantisnormals supplementalsextra(sappends_[1]sdata_by_importancesnsvalueslinessexc_infosnamesextends extra_datasselfsformat_combine_linessextra_data_textstextsinclude_reusablesstrs error_cssshide_display_js( sselfsdata_by_importanceslinessexc_infosnamestextsvaluesns_[1]sextra_data_texts extra_data((s<build/bdist.darwin-8.7.0-Power_Macintosh/egg/pylons/error.pysformat_combine—s5  < < (s__name__s __module__sformat_collected_datasformat_extra_datas zebra_tablesformat_combine(((s<build/bdist.darwin-8.7.0-Power_Macintosh/egg/pylons/error.pys HTMLFormatter3s <  sInvalidTemplatecBstZRS(N(s__name__s __module__(((s<build/bdist.darwin-8.7.0-Power_Macintosh/egg/pylons/error.pysInvalidTemplate®ssPylonsEvalExceptioncBs#tZeeed„Zd„ZRS(NcKs2||_||_h|_|tjo-|tjo d}qU|iddƒ}n||_||_|id|id<|id=xNddddgD]:}d |d |ijot d d |d ƒ‚q˜q˜WyB|hdd <dd <dd <dd <d d <dd <Wnt dƒ‚nXdS(Ns_s xmlhttp_keysdebugs debug_modesheadstraceback_datas extra_datas myghty_datas%(s)ssCould not find %s in templatessset_tabsprefixstInvalid template. Please ensure all % signs are properly quoted as %% and no extra substitution strings are present.( s applicationsselfserror_templates debug_infoss xmlhttp_keysNones global_confsgets errorparamssssInvalidTemplates Exception(sselfs applications global_confs xmlhttp_keyserror_templates errorparamsss((s<build/bdist.darwin-8.7.0-Power_Macintosh/egg/pylons/error.pys__init__³s&          Bc sT|idƒo|i|ˆƒSnti|dtdtƒ} t |dNo Myghty information available.

straceback_datas htmlformatiMiòÿÿÿs myghty_datasmtracesprefixsbodys repost_buttonss7

Extra Data

s sheads extra_datas

s

s

ssset_tab(sformat_eval_htmlsselfsexc_datas base_pathscountershtmls extra_datas formatters error_cssshide_display_jss head_htmlseval_javascriptsmake_repost_buttonsenvirons repost_buttons myghty_datastabshasattrs exc_values htmlformatsmtraceserror_head_templateserror_traceback_templatestraceback_datasjoinserror_templatesreplacespage( sselfspageshtmls repost_buttonstabs head_htmls myghty_datas extra_datastraceback_data((s<build/bdist.darwin-8.7.0-Power_Macintosh/egg/pylons/error.pyscontents&!  /1 !cCs%|id}d||||fSdS(Ns/_debugsÕ (sselfs base_pathscounter(sselfscounters base_path((s<build/bdist.darwin-8.7.0-Power_Macintosh/egg/pylons/error.pyseval_javascript5s (s__name__s __module__s__init__scontentseval_javascript(((s<build/bdist.darwin-8.7.0-Power_Macintosh/egg/pylons/error.pysPylonsDebugInfo s  $sEvalHTMLFormattercBstZd„Zd„ZRS(NcKs,tt|ƒi|||_||_dS(N(ssupersEvalHTMLFormattersselfs__init__skws base_pathscounter(sselfs base_pathscounterskw((s<build/bdist.darwin-8.7.0-Power_Macintosh/egg/pylons/error.pys__init__Ds cCs4tii|||ƒ}|d|i|ifSdS(Nsª        ( s formatters HTMLFormattersformat_source_linesselfsfilenamesframeslinestbids base_path(sselfsfilenamesframesline((s<build/bdist.darwin-8.7.0-Power_Macintosh/egg/pylons/error.pysformat_source_lineIs(s__name__s __module__s__init__sformat_source_line(((s<build/bdist.darwin-8.7.0-Power_Macintosh/egg/pylons/error.pysEvalHTMLFormatterBs c CsÞtd|d|dtƒ}|i|ƒ\} }td|d|dt dtdtƒ}|i|ƒ\}} t i|dt ƒ}|i|iƒ|i|iƒjod|}nd}d| |ti|ƒf|fSdS( Ns base_pathscountersinclude_reusablesshow_hidden_framessshow_extra_datas
%s
ss %s
%s
(sEvalHTMLFormatters base_pathscountersFalsesshort_formattersformat_collected_datasexc_datasshort_ers extra_datasTrueslong_formatterslong_ersextra_data_nones formatters format_textstext_ers filter_framessframessfull_traceback_htmlscgisescape( sexc_datas base_pathscounterslong_formattersshort_formatterslong_erstext_ersfull_traceback_htmls extra_datasshort_ersextra_data_none((s<build/bdist.darwin-8.7.0-Power_Macintosh/egg/pylons/error.pysformat_eval_htmlSs    % s{ Server Error %(head)s

Pylons


%(extra_data)s
%(myghty_data)s
%(traceback_data)s


The Pylons Team | Top
sD s{

Error Traceback

%(body)s
Extra Features
>>Display the lines of code near each part of the traceback
Show a debug prompt to allow you to directly debug the code at the traceback
%(repost_button)s(s__doc__s__all__scgis pylons.utils get_prefixsmyghty.exceptionsmyghtyssysspaste.evalexception.middlewarespaste.exceptions.formatterserrormiddlewares Supplements formatters HTMLFormatters ExceptionsInvalidTemplates EvalExceptionsPylonsEvalExceptions DebugInfosPylonsDebugInfosEvalHTMLFormattersformat_eval_htmlserror_templateserror_head_templateserror_traceback_template(scgismyghtys get_prefixs__all__serror_head_templateserror_traceback_templatesPylonsEvalExceptionsEvalHTMLFormattersformat_eval_htmlssyss SupplementsPylonsDebugInfos HTMLFormattersInvalidTemplateserror_template((s<build/bdist.darwin-8.7.0-Power_Macintosh/egg/pylons/error.pys? s   !{Y8 6G-PKho5]CìHHpylons/helpers.py"""``etag_cache``, ``redirect_to``, and ``abort`` methods Additional helper object available for use in Controllers is the etag_cache. """ from routes import redirect_to import paste.httpexceptions as httpexceptions import pylons def etag_cache(key=None): """Use the HTTP Entity Tag cache for Browser side caching If a "If-None-Match" header is found, and equivilant to ``key``, then a ``304`` HTTP message will be returned with the ETag to tell the browser that it should use its current cache of the page. Otherwise, the ETag header will be added to a new response object and returned for use in your action. Suggested use is within a Controller Action like so: .. code-block:: Python import pylons class YourController(BaseController): def index(self): resp = etag_cache(key=1) resp.write(render('/splash.myt')) return resp .. Note:: This works because etag_cache will raise an HTTPNotModified exception if the ETag recieved matches the key provided. """ if_none_match = pylons.request.environ.get('HTTP_IF_NONE_MATCH', None) resp = pylons.Response() resp.headers['ETag'] = key if str(key) == if_none_match: raise httpexceptions.HTTPNotModified() else: return resp def abort(status_code=None, detail="", headers=None, comment=None): """Aborts the request immediately by returning an HTTP exception In the event that the status_code is a 300 series error, the detail attribute will be used as the Location header should one not be specified in the headers attribute. """ exc = httpexceptions.get_exception(status_code)(detail, headers, comment) raise exc __all__ = ['etag_cache', 'redirect_to', 'abort'] PKÇ«'5Ô«Ó*1 1 pylons/helpers.pyc;ò %ÍèDc@s\dZdklZdkiZdkZed„Zedeed„ZdddgZ dS( s†``etag_cache``, ``redirect_to``, and ``abort`` methods Additional helper object available for use in Controllers is the etag_cache. (s redirect_toNcCs\tiiidtƒ}tiƒ}||i dbuild/bdist.darwin-8.7.0-Power_Macintosh/egg/pylons/helpers.pys etag_cache s  scCs%ti|ƒ|||ƒ}|‚dS(sAborts the request immediately by returning an HTTP exception In the event that the status_code is a 300 series error, the detail attribute will be used as the Location header should one not be specified in the headers attribute. N(shttpexceptionss get_exceptions status_codesdetailsheadersscommentsexc(s status_codesdetailsheadersscommentsexc((s>build/bdist.darwin-8.7.0-Power_Macintosh/egg/pylons/helpers.pysabort.ss etag_caches redirect_tosabort( s__doc__sroutess redirect_tospaste.httpexceptionsshttpexceptionsspylonssNones etag_cachesaborts__all__(spylonss__all__s redirect_tosabortshttpexceptionss etag_cache((s>build/bdist.darwin-8.7.0-Power_Macintosh/egg/pylons/helpers.pys?s     # PK‘A'5#mÙçXXpylons/legacy.py"""Legacy objects for Pylons 0.8 projects Myghty compatibility object, old-style ``params`` and ``m`` globals. The ``response`` object is used to buffer the output. """ from paste.registry import StackedObjectProxy import paste.httpexceptions as httpexceptions import pylons import pylons.helpers import pylons.templating as tmpl # Legacy objects m = StackedObjectProxy(name="m legacy object") response = StackedObjectProxy(name="response") params = StackedObjectProxy(name="params") class Myghty_Compat(object): """Myghty Compatibility Object for Pylons 0.8 Projects""" def __init__(self, environ, start_response): self.environ = environ self.start_response = start_response self.headers_out = response.headers self.headers_in = pylons.request.headers self.request_args = pylons.request._legacy_params def write(self, content): response.write(content) def out(self, content): response.write(content) def cache_self(self, *args, **kargs): return False def subexec(self, *args, **kargs): response.write(tmpl.render(*args, **kargs)) def comp(self, *args, **kargs): response.write(tmpl.render(fragment=True, *args, **kargs)) def scomp(self, *args, **kargs): return tmpl.render(fragment=True, *args, **kargs) def fetch_component(self, name): return name def get_cache(self, component): return pylons.cache.get_cache(component) def send_redirect(self, path, hard=True): raise httpexceptions.HTTPFound(path) def abort(self, status_code=None, reason=""): if status_code == 404: raise httpexceptions.HTTPNotFound() else: exc = httpexceptions.get_exception(status_code)(detail=reason) raise exc __all__ = ['m', 'params'] PKÇ«'5¼³é±±pylons/legacy.pyc;ò ã6Ec@sdZdklZdkiZdkZdkZdkiZ eddƒZ eddƒZ eddƒZ de fd„ƒYZd dgZdS( s¤Legacy objects for Pylons 0.8 projects Myghty compatibility object, old-style ``params`` and ``m`` globals. The ``response`` object is used to buffer the output. (sStackedObjectProxyNsnamesm legacy objectsresponsesparamss Myghty_CompatcBsztZdZd„Zd„Zd„Zd„Zd„Zd„Zd„Z d„Z d „Z e d „Z ed d „ZRS( s3Myghty Compatibility Object for Pylons 0.8 ProjectscCs@||_||_ti|_tii|_tii |_ dS(N( senvironsselfsstart_responsesresponsesheaderss headers_outspylonssrequests headers_ins_legacy_paramss request_args(sselfsenvironsstart_response((s=build/bdist.darwin-8.7.0-Power_Macintosh/egg/pylons/legacy.pys__init__s    cCsti|ƒdS(N(sresponseswritescontent(sselfscontent((s=build/bdist.darwin-8.7.0-Power_Macintosh/egg/pylons/legacy.pyswritescCsti|ƒdS(N(sresponseswritescontent(sselfscontent((s=build/bdist.darwin-8.7.0-Power_Macintosh/egg/pylons/legacy.pysoutscOstSdS(N(sFalse(sselfsargsskargs((s=build/bdist.darwin-8.7.0-Power_Macintosh/egg/pylons/legacy.pys cache_self"scOstiti||ŽƒdS(N(sresponseswritestmplsrendersargsskargs(sselfsargsskargs((s=build/bdist.darwin-8.7.0-Power_Macintosh/egg/pylons/legacy.pyssubexec%scOs#titidt||ŽƒdS(Nsfragment(sresponseswritestmplsrendersTruesargsskargs(sselfsargsskargs((s=build/bdist.darwin-8.7.0-Power_Macintosh/egg/pylons/legacy.pyscomp(scOstidt||ŽSdS(Nsfragment(stmplsrendersTruesargsskargs(sselfsargsskargs((s=build/bdist.darwin-8.7.0-Power_Macintosh/egg/pylons/legacy.pysscomp+scCs|SdS(N(sname(sselfsname((s=build/bdist.darwin-8.7.0-Power_Macintosh/egg/pylons/legacy.pysfetch_component.scCstii|ƒSdS(N(spylonsscaches get_caches component(sselfs component((s=build/bdist.darwin-8.7.0-Power_Macintosh/egg/pylons/legacy.pys get_cache1scCsti|ƒ‚dS(N(shttpexceptionss HTTPFoundspath(sselfspathshard((s=build/bdist.darwin-8.7.0-Power_Macintosh/egg/pylons/legacy.pys send_redirect4sscCs?|djotiƒ‚nti|ƒd|ƒ}|‚dS(Ni”sdetail(s status_codeshttpexceptionss HTTPNotFounds get_exceptionsreasonsexc(sselfs status_codesreasonsexc((s=build/bdist.darwin-8.7.0-Power_Macintosh/egg/pylons/legacy.pysabort7s (s__name__s __module__s__doc__s__init__swritesouts cache_selfssubexecscompsscompsfetch_components get_cachesTrues send_redirectsNonesabort(((s=build/bdist.darwin-8.7.0-Power_Macintosh/egg/pylons/legacy.pys Myghty_Compats           sm(s__doc__spaste.registrysStackedObjectProxyspaste.httpexceptionsshttpexceptionsspylonsspylons.helpersspylons.templatings templatingstmplsmsresponsesparamssobjects Myghty_Compats__all__( stmplspylonss__all__sms Myghty_CompatsStackedObjectProxysparamsshttpexceptionssresponse((s=build/bdist.darwin-8.7.0-Power_Macintosh/egg/pylons/legacy.pys?s     +PKp›5ï«Ì×¶¶pylons/middleware.py"""EvalException, Error Documents, and Globals middleware""" import os.path import pylons.helpers from paste.deploy.converters import asbool from paste.urlparser import StaticURLParser from webhelpers.rails.asset_tag import javascript_path media_path = os.path.join(os.path.dirname(__file__), 'media') class Globals(object): """Legacy Globals object""" pass class StaticJavascripts(object): """ Middleware for intercepting requests for WebHelpers' included javascript files. Triggered when PATH_INFO begins with '/javascripts/'. """ def __init__(self): self.javascripts_app = StaticURLParser(os.path.dirname(javascript_path)) def __call__(self, environ, start_response): if environ.get('PATH_INFO', '').startswith('/javascripts/'): return self.javascripts_app(environ, start_response) else: return self.javascripts_app.not_found(environ, start_response) def run_wsgi(app, m, req): """Legacy WSGI call""" pylons.helpers.response.content = app(m.environ, m.start_response) pylons.helpers.response.wsgicall = True def ErrorHandler(app, global_conf, **errorware): """ErrorHandler Toggle If debug is enabled, this function will return the app wrapped in our customized Paste EvalException middleware we have called the ``PylonsEvalException``. Otherwise, the app will be wrapped in the Paste ErrorMiddleware, and the ``errorware`` dict will be passed into it. """ if asbool(global_conf.get('debug')): from pylons.error import PylonsEvalException app = PylonsEvalException(app, global_conf, **errorware) else: from paste.exceptions.errormiddleware import ErrorMiddleware if errorware.has_key('error_template'): del errorware['error_template'] app = ErrorMiddleware(app, global_conf, **errorware) return app # # Error Document Handling # from paste.recursive import RecursiveMiddleware from paste.errordocument import StatusBasedForward from urllib import urlencode from paste.deploy.converters import asbool from pylons.util import get_prefix def error_mapper(code, message, environ, global_conf=None, **kw): if environ.get('pylons.error_call'): return None else: environ['pylons.error_call'] = True if global_conf is None: global_conf = {} codes = [401, 403, 404] if not asbool(global_conf.get('debug')): codes.append(500) if code in codes: # StatusBasedForward expects a relative URL (no SCRIPT_NAME) url = '/error/document/?%s' % (urlencode({'message':message, 'code':code})) return url def ErrorDocuments(app, global_conf=None, mapper=None, **kw): """Wraps the app in error docs using Paste RecursiveMiddleware and ErrorDocumentsMiddleware All the args are passed directly into the ErrorDocumentsMiddleware. If no mapper is given, a default error_mapper is passed in. """ if global_conf is None: global_conf = {} if mapper is None: mapper = error_mapper return RecursiveMiddleware(StatusBasedForward(app, global_conf=global_conf, mapper=mapper, **kw)) error_document_template = """\ Server Error %(code)s

Pylons


Error %(code)s

%(message)s

The Pylons Team | Top
""" __pudge_all__ = ['ErrorHandler', 'ErrorDocuments', 'StaticJavascripts'] PKÇ«'5ü8ç]"]"pylons/middleware.pyc;ò éDc@sdZdkZdkZdklZdklZdk l Z ei i ei i eƒdƒZdefd„ƒYZdefd „ƒYZd „Zd „Zd klZd klZdklZdklZdklZed„Zeed„ZdZ dddgZ!dS(s6EvalException, Error Documents, and Globals middlewareN(sasbool(sStaticURLParser(sjavascript_pathsmediasGlobalscBstZdZRS(sLegacy Globals object(s__name__s __module__s__doc__(((sAbuild/bdist.darwin-8.7.0-Power_Macintosh/egg/pylons/middleware.pysGlobals s sStaticJavascriptscBs tZdZd„Zd„ZRS(s” Middleware for intercepting requests for WebHelpers' included javascript files. Triggered when PATH_INFO begins with '/javascripts/'. cCsttiitƒƒ|_dS(N(sStaticURLParsersosspathsdirnamesjavascript_pathsselfsjavascripts_app(sself((sAbuild/bdist.darwin-8.7.0-Power_Macintosh/egg/pylons/middleware.pys__init__scCsG|iddƒidƒo|i||ƒSn|ii||ƒSdS(Ns PATH_INFOss /javascripts/(senvironsgets startswithsselfsjavascripts_appsstart_responses not_found(sselfsenvironsstart_response((sAbuild/bdist.darwin-8.7.0-Power_Macintosh/egg/pylons/middleware.pys__call__s(s__name__s __module__s__doc__s__init__s__call__(((sAbuild/bdist.darwin-8.7.0-Power_Macintosh/egg/pylons/middleware.pysStaticJavascriptss  cCs1||i|iƒtii_ttii_ dS(sLegacy WSGI callN( sappsmsenvironsstart_responsespylonsshelperssresponsescontentsTrueswsgicall(sappsmsreq((sAbuild/bdist.darwin-8.7.0-Power_Macintosh/egg/pylons/middleware.pysrun_wsgiscKs{t|idƒƒo#dkl}||||}n;dkl}|i dƒo |d=n||||}|SdS(sKErrorHandler Toggle If debug is enabled, this function will return the app wrapped in our customized Paste EvalException middleware we have called the ``PylonsEvalException``. Otherwise, the app will be wrapped in the Paste ErrorMiddleware, and the ``errorware`` dict will be passed into it. sdebug(sPylonsEvalException(sErrorMiddlewareserror_templateN( sasbools global_confsgets pylons.errorsPylonsEvalExceptionsapps errorwares paste.exceptions.errormiddlewaresErrorMiddlewareshas_key(sapps global_confs errorwaresErrorMiddlewaresPylonsEvalException((sAbuild/bdist.darwin-8.7.0-Power_Macintosh/egg/pylons/middleware.pys ErrorHandler"s    (sRecursiveMiddleware(sStatusBasedForward(s urlencode(s get_prefixcKs«|idƒotSn t|d<|tjo h}ndddg}t|idƒƒ o|idƒn||jo*dt hd|<d |<ƒ}|SndS( Nspylons.error_calli‘i“i”sdebugiôs/error/document/?%ssmessagescode( senvironsgetsNonesTrues global_confscodessasboolsappendscodes urlencodesmessagesurl(scodesmessagesenvirons global_confskwsurlscodes((sAbuild/bdist.darwin-8.7.0-Power_Macintosh/egg/pylons/middleware.pys error_mapperAs    "cKsQ|tjo h}n|tjo t}ntt|d|d||ƒSdS(sêWraps the app in error docs using Paste RecursiveMiddleware and ErrorDocumentsMiddleware All the args are passed directly into the ErrorDocumentsMiddleware. If no mapper is given, a default error_mapper is passed in. s global_confsmapperN(s global_confsNonesmappers error_mappersRecursiveMiddlewaresStatusBasedForwardsappskw(sapps global_confsmapperskw((sAbuild/bdist.darwin-8.7.0-Power_Macintosh/egg/pylons/middleware.pysErrorDocumentsQs     sà Server Error %(code)s

Pylons


Error %(code)s

%(message)s

The Pylons Team | Top
s ErrorHandlersErrorDocuments("s__doc__sos.pathsosspylons.helpersspylonsspaste.deploy.converterssasboolspaste.urlparsersStaticURLParserswebhelpers.rails.asset_tagsjavascript_pathspathsjoinsdirnames__file__s media_pathsobjectsGlobalssStaticJavascriptssrun_wsgis ErrorHandlerspaste.recursivesRecursiveMiddlewarespaste.errordocumentsStatusBasedForwardsurllibs urlencodes pylons.utils get_prefixsNones error_mappersErrorDocumentsserror_document_templates __pudge_all__(s urlencodes error_mappers get_prefixspylonssasboolsRecursiveMiddlewaresStatusBasedForwardsrun_wsgisErrorDocumentss ErrorHandlersGlobalss media_pathsStaticURLParserserror_document_templates __pudge_all__sossjavascript_pathsStaticJavascripts((sAbuild/bdist.darwin-8.7.0-Power_Macintosh/egg/pylons/middleware.pys?s&     !         ˆPK†¨'5?’‚L0L0pylons/templating.py"""Buffet templating plugin and render functions The Buffet object is styled after the original Buffet module that implements template language neutral rendering for CherryPy. This version of Buffet also contains caching functionality that utilizes `Beaker middleware `_ to provide template language neutral caching functionality. A customized version of `BuffetMyghty `_ is included that provides a template API hook as the ``pylonsmyghty`` engine. This version of BuffetMyghty disregards some of the TurboGears API spec so that traditional Myghty template names can be used with ``/`` and file extensions. The render functions are intended as the primary user-visible rendering commands and hook into Buffet to make rendering content easy. """ import pkg_resources import os try: from cStringIO import StringIO except ImportError: from StringIO import StringIO import myghty.interp import paste.wsgiwrappers import pylons class BuffetError(Exception): pass class Buffet(object): """Buffet style plug-in template rendering Buffet implements template language plug-in support modeled highly on the `Buffet Project `_ from which this class inherits its name. """ def __init__(self, default_engine=None, template_root=None, default_options=None, **config): """Initialize the Buffet renderer, and optionally set a default engine/options""" if default_options is None: default_options = {} self.default_engine = default_engine self.template_root = template_root self.default_options = default_options self.engines = {} if self.default_engine: self.prepare(default_engine, template_root, **config) def prepare(self, engine_name, template_root=None, alias=None, **config): """Prepare a template engine for use This method must be run before the `render <#render>`_ method is called so that the ``template_root`` and options can be set. Template engines can also be aliased if you wish to use multiplate configurations of the same template engines, or prefer a shorter name when rendering a template with the engine of your choice. """ Engine = available_engines.get(engine_name, None) if not Engine: raise TemplateEngineMissing('Please install a plugin for ' '"%s" to use its functionality' % engine_name) engine_name = alias or engine_name defaults = config.pop('default_options', None) self.engines[engine_name] = \ dict(engine=Engine(options=config), root=template_root) def _update_names(self, ns): d = ns d.update(dict( c=pylons.c._current_obj(), h=pylons.h, request=pylons.request._current_obj(), g=pylons.g._current_obj(), session=pylons.session._current_obj(), s=pylons.session._current_obj(), render=render, )) if hasattr(d['request'], '_h'): d['h'] = d['request']._h return d def render(self, engine_name=None, template_name=None, include_pylons_variables=True, namespace=None, cache_key=None, cache_expire=None, cache_type=None, **options): """Render a template using a template engine plug-in To use templates it is expected that you will attach data to be used in the template to the ``c`` variable which is available in the controller and the template. When porting code from other projects it is sometimes easier to use an exisitng dictionary which can be specified with ``namespace``. ``engine_name`` The name of the template engine to use, which must be 'prepared' first. ``template_name`` Name of the template to render ``include_pylons_variables`` If a custom namespace is specified this determines whether Pylons variables are included in the namespace or not. Defaults to ``True``. ``namespace`` A custom dictionary of names and values to be substituted in the template. If ``include_pylons_variables`` is ``True`` and any keys in ``namespace`` conflict with names of Pylons variables, an error is raised. Caching options (uses Beaker caching middleware) ``cache_key`` Key to cache this copy of the template under. ``cache_type`` Valid options are ``dbm``, ``file``, ``memory``, or ``ext:memcached``. ``cache_expire`` Time in seconds to cache this template with this ``cache_key`` for. Or use 'never' to designate that the cache should never expire. The minimum key required to trigger caching is ``cache_expire='never'`` which will cache the template forever seconds with no key. All other keyword options are passed directly to the template engine used. """ if not engine_name and self.default_engine: engine_name = self.default_engine engine_config = self.engines.get(engine_name) if not engine_config: raise Exception, "No engine with that name configured: %s" % engine_name full_path = template_name if engine_name != 'pylonsmyghty': if namespace==None: if include_pylons_variables is False: raise BuffetError('You must specify ``namespace`` if ``include_pylons_variables`` is ' 'False') else: namespace = self._update_names({}) elif isinstance(namespace, dict): if include_pylons_variables is True: for k in ['c','h','g','request','session', 'params']: if k in namespace: raise Exception('The variable %s specified in namespace conflicts ' 'with the Pylons variable of the same name. Set ``include_pylons_variables`` ' 'to ``False`` if you do not want to use Pylons variables in your template'%k) namespace = self._update_names(namespace) else: namespace = self._update_names(namespace) if not engine_name.startswith('pylons'): full_path = os.path.join(engine_config['root'], template_name) full_path = full_path.replace(os.path.sep, '.').lstrip('.') else: if namespace is None: namespace = {} namespace['_global_args'] = self._update_names({}) # Reserved myghty keywords for key in ('output_encoding', 'encoding_errors', 'disable_unicode'): if key in namespace: options[key] = namespace.pop(key) # If they passed in a variable thats listed in the global_args, # update the global args one instead of duplicating it interp = engine_config['engine'].interpreter for key in interp.global_args.keys() + interp.init_params.get('allow_globals', []): if key in namespace: namespace['_global_args'][key] = namespace.pop(key) # If one of them is not None then the user did set something if cache_key is not None or cache_expire is not None or cache_type is not None: if not cache_type: cache_type = 'dbm' if not cache_key: cache_key = 'default' if cache_expire == 'never': cache_expire = None def content(): return engine_config['engine'].render(namespace, template=full_path, **options) tfile = full_path if options.get('fragment', False): tfile += '_frag' mycache = pylons.cache.get_cache(tfile) content = mycache.get_value(cache_key, createfunc=content, type=cache_type, expiretime=cache_expire) return content return engine_config['engine'].render(namespace, template=full_path, **options) class TemplateEngineMissing(Exception): pass class MyghtyTemplatePlugin(object): """Myghty Template Plugin This Myghty Template Plugin varies from the official BuffetMyghty in that it will properly populate all the default Myghty variables needed and render fragments. """ extension = "myt" def __init__(self, extra_vars_func=None, options=None): if options is None: options = {} myt_opts = {} for k, v in options.iteritems(): if k.startswith('myghty.'): myt_opts[k[7:]] = v self.interpreter = myghty.interp.Interpreter(**myt_opts) def load_template(self, template_path): pass def render(self, info, format="html", fragment=False, template=None, output_encoding=None, encoding_errors=None, disable_unicode=False): buf = StringIO() global_args = info.pop('_global_args') optional_args = dict(disable_unicode=disable_unicode) if fragment: optional_args['disable_wrapping'] = True if output_encoding: optional_args['output_encoding'] = output_encoding if encoding_errors: optional_args['encoding_errors'] = encoding_errors self.interpreter.execute(template, request_args=info, global_args=global_args, out_buffer=buf, **optional_args) return buf.getvalue() available_engines = {} for entry_point in pkg_resources.iter_entry_points('python.templating.engines'): Engine = entry_point.load() available_engines[entry_point.name] = Engine def render(*args, **kargs): """Render a template and return it as a string (possibly Unicode) Optionally takes 3 keyword arguments to use caching supplied by Buffet. Example:: >>> content = render('/my/template.myt') >>> print content >>> content = render('/my/template.myt', fragment=True) .. admonition:: Note Not all template languages support the concept of a fragment. In those template languages that do support the fragment option, this usually implies that the template will be rendered without extending or inheriting any site skin. """ fragment = kargs.pop('fragment', False) args = list(args) template = args.pop() cache_args = dict(cache_expire=kargs.pop('cache_expire', None), cache_type=kargs.pop('cache_type', None), cache_key=kargs.pop('cache_key', None)) if args: engine = args.pop() return pylons.buffet.render(engine, template, fragment=fragment, namespace=kargs, **cache_args) return pylons.buffet.render(template_name=template, fragment=fragment, namespace=kargs, **cache_args) def render_response(*args, **kargs): """Returns the rendered response within a Response object See ``render`` for information on rendering. Example: .. code-block:: Python def view(self): return render_response('/my/template.myt') """ response = pylons.Response(render(*args, **kargs)) output_encoding = kargs.get('output_encoding') encoding_errors = kargs.get('encoding_errors') if output_encoding: response.headers['Content-Type'] = '%s; charset=%s' % \ (paste.wsgiwrappers.settings['content_type'], output_encoding) if encoding_errors: response.encoding_errors = encoding_errors return response __pudge_all__ = ['render', 'render_response', 'Buffet', 'MyghtyTemplatePlugin'] __all__ = ['render', 'render_response', 'Buffet', 'MyghtyTemplatePlugin'] PKÇ«'57þ77pylons/templating.pyc;ò ¼ëEc@s2dZdkZdkZydklZWn ej odklZnXdkZdkZ dk Z de fd„ƒYZ de fd„ƒYZde fd„ƒYZd e fd „ƒYZhZx0eid ƒD]ZeiƒZeeei`_ to provide template language neutral caching functionality. A customized version of `BuffetMyghty `_ is included that provides a template API hook as the ``pylonsmyghty`` engine. This version of BuffetMyghty disregards some of the TurboGears API spec so that traditional Myghty template names can be used with ``/`` and file extensions. The render functions are intended as the primary user-visible rendering commands and hook into Buffet to make rendering content easy. N(sStringIOs BuffetErrorcBstZRS(N(s__name__s __module__(((sAbuild/bdist.darwin-8.7.0-Power_Macintosh/egg/pylons/templating.pys BuffetErrorssBuffetcBsVtZdZeeed„Zeed„Zd„Zeeeeeeed„ZRS(sôBuffet style plug-in template rendering Buffet implements template language plug-in support modeled highly on the `Buffet Project `_ from which this class inherits its name. cKs`|tjo h}n||_||_||_h|_|io|i|||ndS(sSInitialize the Buffet renderer, and optionally set a default engine/optionsN(sdefault_optionssNonesdefault_enginesselfs template_rootsenginesspreparesconfig(sselfsdefault_engines template_rootsdefault_optionssconfig((sAbuild/bdist.darwin-8.7.0-Power_Macintosh/egg/pylons/templating.pys__init__(s       cKsvti|tƒ}| otd|ƒ‚n|p|}|idtƒ}t d|d|ƒd|ƒ|i |`_ method is called so that the ``template_root`` and options can be set. Template engines can also be aliased if you wish to use multiplate configurations of the same template engines, or prefer a shorter name when rendering a template with the engine of your choice. s9Please install a plugin for "%s" to use its functionalitysdefault_optionssenginesoptionssrootN(savailable_enginessgets engine_namesNonesEnginesTemplateEngineMissingsaliassconfigspopsdefaultssdicts template_rootsselfsengines(sselfs engine_names template_rootsaliassconfigsEnginesdefaults((sAbuild/bdist.darwin-8.7.0-Power_Macintosh/egg/pylons/templating.pysprepare5s  cCs¡|}|itdtiiƒdtidtiiƒdti iƒdti iƒdti iƒdt ƒƒt |ddƒo|di |dtiiˆd |ƒ‰ˆitiid ƒid ƒ‰q>nˈt jo h‰n|ihƒˆd>> content = render('/my/template.myt') >>> print content >>> content = render('/my/template.myt', fragment=True) .. admonition:: Note Not all template languages support the concept of a fragment. In those template languages that do support the fragment option, this usually implies that the template will be rendered without extending or inheriting any site skin. sfragments cache_expires cache_types cache_keys namespaces template_nameN(skargsspopsFalsesfragmentslistsargsstemplatesdictsNones cache_argssenginespylonssbuffetsrender(sargsskargssenginesfragmentstemplates cache_args((sAbuild/bdist.darwin-8.7.0-Power_Macintosh/egg/pylons/templating.pysrenderôs   cOs~tit||Žƒ}|idƒ}|idƒ}|o%dt i i d|f|i d %s\n'%str(msg)) def _(value): """Mark a string for translation Mark a string to be internationalized as follows: .. code-block:: Python h._('This should be in lots of languages') """ return pylons.translator['translator'].gettext(value) def set_lang(lang): """Set the language used""" project_name = CONFIG['app_conf']['package'] pylons.translator['lang'] = lang if lang is None: pylons.translator['translator'] = _Translator() else: from pkg_resources import resource_string, resource_stream, \ resource_exists, resource_filename from pylons.i18n.translation import egg_translation catalog_path = os.path.join('i18n', lang, 'LC_MESSAGES') if not resource_exists(project_name, catalog_path): raise LanguageError('Language catalog %s not found' % \ os.path.join(project_name, catalog_path)) pylons.translator['translator'] = \ egg_translation(project_name, lang=catalog_path) def get_lang(): return pylons.translator['lang'] def get_prefix(environ): if environ.has_key('paste.config'): prefix = environ['paste.config']['app_conf'].get('prefix', '') else: # Not ideal but if the error occurs before the paste.config is available not a lot we can do prefix = '' if not prefix: if environ.get('SCRIPT_NAME', '') != '': prefix = environ['SCRIPT_NAME'] return prefix def class_name_from_module_name(module_name): """Takes a module name and returns the name of the class it defines. If the module name contains dashes, they are replaced with underscores. Example:: >>> class_name_from_module_name('with-dashes') 'WithDashes' >>> class_name_from_module_name('with_underscores') 'WithUnderscores' >>> class_name_from_module_name('oneword') 'Oneword' """ words = module_name.replace('-', '_').split('_') return ''.join([w.title() for w in words]) class ContextObj(object): """ The 'c' object, with strict attribute access (raises an Exception when the attribute does not exist) """ pass class AttribSafeContextObj(object): """ The 'c' object, with lax attribute access (returns '' when the attribute does not exist) """ def __getattr__(self, name): try: return object.__getattribute__(self, name) except AttributeError: return '' class LanguageError(Exception): """Exception raised when a problem occurs with changing languages""" pass class _Translator(object): """An empty gettext translator which just returns the original string""" def gettext(self, value): return value class Helpers(object): def __init__(self, **opts): pass def __getattr__(self, name): if hasattr(pylons.request._oldh, name): return getattr(pylons.request._oldh, name) elif hasattr(pylons.request, '_h') and hasattr(pylons.request._h, name): return getattr(pylons.request._h, name) elif name in pylons.translator: if name == 'lang': warnings.warn('Getting the translator language via h.lang is ' 'deprecated: Please use h.get_lang() instead', DeprecationWarning, 2) return pylons.translator[name] else: raise AttributeError("No such helper: '%s'" % repr(name)) def __setattr__(self, name, value): if name != 'lang': raise AttributeError('Helper attributes cannot be set, except for ' "the special 'lang' attribute. Use the " "context object 'c' to store context data.") else: warnings.warn("Setting the translator language via h.lang = '%s' is " "deprecated: Please use h.set_lang('%s') instead" % \ (value, value), DeprecationWarning, 2) self.set_lang(value) def translate(self, value): """Deprecated, use _()""" raise NotImplementedError('Use h._() instead') log = staticmethod(log) _ = staticmethod(_) set_lang = staticmethod(set_lang) get_lang = staticmethod(get_lang) class PylonsTemplate(Template): _template_dir = 'templates/paster_template' summary = 'Pylons application template' egg_plugins = ['Pylons', 'WebHelpers'] __all__ = ['AttribSafeContextObj', 'ContextObj', 'Helpers', 'class_name_from_module_name', 'log', '_', 'set_lang', 'get_lang'] __pudge_all__ = __all__ + ['PylonsTemplate'] PKÇ«'5@Ý_oï"ï"pylons/util.pyc;ò ´áEc@sCdZdkZdkZdkZdkZdklZdkl Z dk l Z dk Z d„Z d„Zd„Zd„Zd „Zd „Zd efd „ƒYZd efd„ƒYZdefd„ƒYZdefd„ƒYZdefd„ƒYZde fd„ƒYZd d ddddddgZedgZdS(sHelpers object, Paste Template config and misc. functionality. The util module provides the main Helper object used by Pylons. PylonsTemplate is a Paste Template sub-class that configures the source directory and default plug-ins for a new Pylons project. N(sCONFIG(sTemplate(sthreadinglocalcCs%tiididt|ƒƒdS(s Log a message to the output log.s wsgi.errorss=> %s N(spylonssrequestsenvironswritesstrsmsg(smsg((s;build/bdist.darwin-8.7.0-Power_Macintosh/egg/pylons/util.pyslogscCstidi|ƒSdS(sºMark a string for translation Mark a string to be internationalized as follows: .. code-block:: Python h._('This should be in lots of languages') s translatorN(spylonss translatorsgettextsvalue(svalue((s;build/bdist.darwin-8.7.0-Power_Macintosh/egg/pylons/util.pys_s cCsÑtdd}|tid<|tjotƒtid>> class_name_from_module_name('with-dashes') 'WithDashes' >>> class_name_from_module_name('with_underscores') 'WithUnderscores' >>> class_name_from_module_name('oneword') 'Oneword' s-s_sN( s module_namesreplacessplitswordssjoinsappends_[1]swstitle(s module_names_[1]swswords((s;build/bdist.darwin-8.7.0-Power_Macintosh/egg/pylons/util.pysclass_name_from_module_name@ss ContextObjcBstZdZRS(sj The 'c' object, with strict attribute access (raises an Exception when the attribute does not exist) (s__name__s __module__s__doc__(((s;build/bdist.darwin-8.7.0-Power_Macintosh/egg/pylons/util.pys ContextObjRs sAttribSafeContextObjcBstZdZd„ZRS(s^ The 'c' object, with lax attribute access (returns '' when the attribute does not exist) cCs2yti||ƒSWntj o dSnXdS(Ns(sobjects__getattribute__sselfsnamesAttributeError(sselfsname((s;build/bdist.darwin-8.7.0-Power_Macintosh/egg/pylons/util.pys __getattr__Zs(s__name__s __module__s__doc__s __getattr__(((s;build/bdist.darwin-8.7.0-Power_Macintosh/egg/pylons/util.pysAttribSafeContextObjWs s LanguageErrorcBstZdZRS(s>Exception raised when a problem occurs with changing languages(s__name__s __module__s__doc__(((s;build/bdist.darwin-8.7.0-Power_Macintosh/egg/pylons/util.pys LanguageError`s s _TranslatorcBstZdZd„ZRS(sBAn empty gettext translator which just returns the original stringcCs|SdS(N(svalue(sselfsvalue((s;build/bdist.darwin-8.7.0-Power_Macintosh/egg/pylons/util.pysgettextfs(s__name__s __module__s__doc__sgettext(((s;build/bdist.darwin-8.7.0-Power_Macintosh/egg/pylons/util.pys _Translatords sHelperscBs\tZd„Zd„Zd„Zd„ZeeƒZeeƒZee ƒZ ee ƒZ RS(NcKsdS(N((sselfsopts((s;build/bdist.darwin-8.7.0-Power_Macintosh/egg/pylons/util.pys__init__jscCsÊttii|ƒottii|ƒSnšttidƒottii|ƒottii|ƒSnZ|tijo3|djoti dt dƒnti|Snt dt |ƒƒ‚dS(Ns_hslangsYGetting the translator language via h.lang is deprecated: Please use h.get_lang() insteadisNo such helper: '%s'( shasattrspylonssrequests_oldhsnamesgetattrs_hs translatorswarningsswarnsDeprecationWarningsAttributeErrorsrepr(sselfsname((s;build/bdist.darwin-8.7.0-Power_Macintosh/egg/pylons/util.pys __getattr__ms)  cCsK|djotdƒ‚n+tid||ftdƒ|i|ƒdS(Nslangs{Helper attributes cannot be set, except for the special 'lang' attribute. Use the context object 'c' to store context data.sdSetting the translator language via h.lang = '%s' is deprecated: Please use h.set_lang('%s') insteadi(snamesAttributeErrorswarningsswarnsvaluesDeprecationWarningsselfsset_lang(sselfsnamesvalue((s;build/bdist.darwin-8.7.0-Power_Macintosh/egg/pylons/util.pys __setattr__{s   cCstdƒ‚dS(sDeprecated, use _()sUse h._() insteadN(sNotImplementedError(sselfsvalue((s;build/bdist.darwin-8.7.0-Power_Macintosh/egg/pylons/util.pys translate†s( s__name__s __module__s__init__s __getattr__s __setattr__s translates staticmethodslogs_sset_langsget_lang(((s;build/bdist.darwin-8.7.0-Power_Macintosh/egg/pylons/util.pysHelpersis      sPylonsTemplatecBs tZdZdZddgZRS(Nstemplates/paster_templatesPylons application templatesPylonss WebHelpers(s__name__s __module__s _template_dirssummarys egg_plugins(((s;build/bdist.darwin-8.7.0-Power_Macintosh/egg/pylons/util.pysPylonsTemplatessclass_name_from_module_nameslogs_sset_langsget_lang(s__doc__sgettextsos.pathsosssysswarningsspaste.deploy.configsCONFIGspaste.script.templatessTemplatesroutessthreadinglocalspylonsslogs_sset_langsget_langs get_prefixsclass_name_from_module_namesobjects ContextObjsAttribSafeContextObjs Exceptions LanguageErrors _TranslatorsHelperssPylonsTemplates__all__s __pudge_all__(sset_langsTemplatesPylonsTemplates ContextObjslogs__all__sgettextsclass_name_from_module_namespylonsswarningssAttribSafeContextObjssyssHelperss _Translators_sthreadinglocals get_prefixsCONFIGsget_langs LanguageErrors __pudge_all__sos((s;build/bdist.darwin-8.7.0-Power_Macintosh/egg/pylons/util.pys?s,             &PKlª'5¤»±:±:pylons/wsgiapp.py"""WSGI App Creator This module is responsible for creating the basic Pylons WSGI application. It's generally assumed that it will be called by Paste, though any WSGI application server could create and call the WSGI app as well. """ import sys import re import inspect import urllib import warnings import paste.wsgiwrappers import paste.httpexceptions as httpexceptions from paste.registry import RegistryManager from paste.wsgiwrappers import WSGIRequest from routes import request_config import pylons import pylons.templating import pylons.legacy from pylons.util import ContextObj, AttribSafeContextObj, _Translator, class_name_from_module_name from pylons.controllers import Controller, WSGIController class PylonsBaseWSGIApp(object): """Basic Pylons WSGI Application This basic WSGI app is provided should a web developer want to get access to the most basic Pylons web application environment available. By itself, this Pylons web application does little more than dispatch to a controller and setup the context object, the request object, and the globals object. Additional functionality like sessions, and caching can be setup by altering the ``environ['pylons.environ_config']`` setting to indicate what key the ``session`` and ``cache`` functionality should come from. Resolving the URL and dispatching can be customized by sub-classing or "monkey-patching" this class. Subclassing is the preferred approach. """ def __init__(self, mapper, package_name, globals, default_charset=None): self.mapper = mapper self.globals = globals self.package_name = package_name config = globals.pylons_config if default_charset: warnings.warn( "The 'default_charset' keyword argument to the PylonsBaseWSGIApp " "constructor is deprecated. Please specify 'default_charset' to the Config " 'object in your config/environment.py file instead, e.g.:\n' 'return pylons.config.Config(myghty, map, paths, ' "default_charset='%s')" % default_charset, DeprecationWarning, 2) config.default_charset = default_charset self.settings = dict(content_type='text/html', charset=config.default_charset) # Create the redirect function we'll use and save it def redirect_to(url): raise httpexceptions.HTTPFound(url) self.redirect_to = redirect_to # Initialize Buffet and all our template engines, default engine is the # first in the template_engines list def_eng = config.template_engines.pop(0) self.buffet = pylons.templating.Buffet(def_eng['engine'], template_root=def_eng['template_root'], **def_eng['template_options']) for e in config.template_engines: self.buffet.prepare(e['engine'], template_root=e['template_root'], alias=e['alias'], **e['template_options']) def __call__(self, environ, start_response): self.setup_app_env(environ, start_response) if environ.get('paste.testing'): self.load_test_env(environ) # Change our HTTP_METHOD if _method is present, try GET first to avoid # parsing POST unless absolutely necessary. req = pylons.request._current_obj() old_method = None if '_method' in environ['QUERY_STRING'] and req.GET.has_key('_method'): old_method = environ['REQUEST_METHOD'] environ['REQUEST_METHOD'] = req.GET['_method'] elif environ['REQUEST_METHOD'] == 'POST' and req.POST.has_key('_method'): old_method = environ['REQUEST_METHOD'] environ['REQUEST_METHOD'] = req.POST['_method'] controller = self.resolve(environ, start_response) if old_method: environ['REQUEST_METHOD'] = old_method response = self.dispatch(controller, environ, start_response) if environ.get('paste.testing') and hasattr(response, 'wsgi_response'): environ['paste.testing_variables']['response'] = response # Transform HttpResponse objects into WSGI response if hasattr(response, 'wsgi_response'): status, response_headers, content = response.wsgi_response() start_response(status, response_headers) return content elif response: return response # Apparently we returned absolutely nothing, use the response # object if in legacy mode, otherwise raise an exception if environ.get('pylons.legacy'): resp = pylons.legacy.response if hasattr(pylons.legacy.response, 'wsgicall'): # Legacy app using run_wsgi return resp.content status, response_headers, content = resp.wsgi_response() start_response(status, response_headers) return content else: raise Exception, "No content returned by controller: %s" % controller.__name__ def setup_app_env(self, environ, start_response): """Setup and register all the Pylons objects with the registry""" req = WSGIRequest(environ) # This is a legacy test for pre-0.9.2 projects to continue using the old # style Helper. New style directly uses the projects lib.helpers module # for 'normal' Python import usage with no surprises. __import__(self.package_name + '.lib.base') their_h = getattr(sys.modules[self.package_name + '.lib.base'], 'h', None) try: helpers_name = self.package_name + '.config.helpers' __import__(helpers_name) except: helpers_name = self.package_name + '.lib.helpers' __import__(helpers_name) if their_h != pylons.h and their_h is not None: # We're using the new Helper import style req._h = sys.modules[helpers_name] else: # We still need to keep a reference to their helpers for the old # Helpers object. req._oldh = sys.modules[helpers_name] # Setup the translator global object trans = dict(translator=_Translator()) trans['CONFIG'] = dict(app_conf=self.globals.pylons_config.app_conf, global_conf=self.globals.pylons_config.global_conf) if self.globals.pylons_config.app_conf.has_key('lang'): trans['translator'](self.globals.pylons_config.app_conf['lang']) else: trans['lang'] = None environ['paste.registry'].register(pylons.translator, trans) # Setup the basic pylons global objects environ['paste.registry'].register(paste.wsgiwrappers.settings, self.settings) environ['paste.registry'].register(pylons.request, req) if self.globals.pylons_config.strict_c: environ['paste.registry'].register(pylons.c, ContextObj()) else: environ['paste.registry'].register(pylons.c, AttribSafeContextObj()) environ['paste.registry'].register(pylons.g, self.globals) environ['paste.registry'].register(pylons.buffet, self.buffet) # Setup legacy globals if environ.get('pylons.legacy'): # Legacy mixed dictionary instead of MultiDict req._legacy_params = req.params.mixed() environ['paste.registry'].register(pylons.legacy.response, WSGIResponse()) environ['paste.registry'].register(pylons.m, pylons.legacy.Myghty_Compat(environ, start_response)) environ['paste.registry'].register(pylons.params, req._legacy_params) econf = environ['pylons.environ_config'] if econf.get('session'): environ['paste.registry'].register(pylons.session, environ[econf['session']]) if econf.get('cache'): environ['paste.registry'].register(pylons.cache, environ[econf['cache']]) def resolve(self, environ, start_response): """Implements Routes-based dispatching""" config = request_config() config.mapper = self.mapper config.environ = environ config.redirect = self.redirect_to match = config.mapper_dict if not match: return None environ['pylons.routes_dict'] = match controller = match.get('controller') if not controller: return None # Pull the controllers class name, import controller # @@ TODO: Encapsulate in try/except to raise error if controller # doesn't exist, or class in controller file doesn't exist. full_module_name = self.package_name + '.controllers.' \ + controller.replace('/', '.') __import__(full_module_name) module_name = controller.split('/')[-1] class_name = class_name_from_module_name(module_name) + 'Controller' return getattr(sys.modules[full_module_name], class_name) def dispatch(self, controller, environ, start_response): """Dispatches to a controller, will instantiate the controller if necessary""" if not controller: raise httpexceptions.HTTPNotFound() match = environ['pylons.routes_dict'] # Sanitize keys # @@ TODO: This should be done in a lazy fashion for k,v in match.iteritems(): if v: match[k] = urllib.unquote_plus(v) # Older subclass of Controller if inspect.isclass(controller) and not issubclass(controller, WSGIController) and \ issubclass(controller, Controller): controller = controller() controller.start_response = start_response # @@ LEGACY: Attach c to controller if environ.get('pylons.legacy'): controller.c = pylons.c return controller(**match) # If the route included a path_info attribute, we'll assume it # should be pulled, otherwise we call the controller if match.get('path_info'): self.fixup_environ(environ, match) # If it's a class, instantiate it if not hasattr(controller, '__class__') or \ getattr(controller, '__class__') == type: controller = controller() # Controller is assumed to handle a WSGI call return controller(environ, start_response) def fixup_environ(self, environ, dispatch): """Fixes the environ based on the Routes match""" oldpath = environ['PATH_INFO'] newpath = dispatch.get('path_info') or '' environ['PATH_INFO'] = newpath if not environ['PATH_INFO'].startswith('/'): environ['PATH_INFO'] = '/' + environ['PATH_INFO'] environ['SCRIPT_NAME'] += re.sub(r'^(.*?)/' + newpath + '$', r'\1', oldpath) if environ['SCRIPT_NAME'].endswith('/'): environ['SCRIPT_NAME'] = environ['SCRIPT_NAME'][:-1] def load_test_env(self, environ): """Sets up our Paste testing environment""" testenv = environ['paste.testing_variables'] testenv['req'] = pylons.request._current_obj() testenv['c'] = pylons.c._current_obj() testenv['g'] = pylons.g._current_obj() econf = environ['pylons.environ_config'] if econf.get('session'): testenv['session'] = environ[econf['session']] if econf.get('cache'): testenv['cache'] = environ[econf['cache']] class PylonsApp(object): """Setup the Pylons default environment Pylons App sets up the basic Pylons app, and initializes the global object, sessions and caching. Sessions and caching can be overridden in the config object by supplying other keys to look for in the environ where objects for the session/cache will be. If they're set to none, then no session/cache objects will be available. """ def __init__(self, config, default_charset=None): self.config = config if default_charset: warnings.warn( "The 'default_charset' keyword argument to the PylonsApp constructor is " "deprecated. Please specify 'default_charset' to the Config object in your " 'config/environment.py file instead, e.g.:\n' 'return pylons.config.Config(myghty, map, paths, ' "default_charset='%s')" % default_charset, DeprecationWarning, 2) self.config.default_charset = default_charset g = None try: package = __import__(config.package + '.lib.app_globals', globals(), locals(), ['Globals']) except ImportError: pass else: g = package.Globals(config.global_conf, config.app_conf, config=config) g.pylons_config = config # Create the base Pylons wsgi app app = PylonsBaseWSGIApp(config.map, config.package, g) # Pull user-specified environ overrides, or just setup default # session and caching objects self.econf = econf = config.environ_config.copy() if not econf.has_key('session'): from beaker.session import SessionMiddleware econf['session'] = 'beaker.session' app = SessionMiddleware(app, config.global_conf, auto_register=True, **config.app_conf) if not econf.has_key('cache'): from beaker.cache import CacheMiddleware econf['cache'] = 'beaker.cache' app = CacheMiddleware(app, config.global_conf, **config.app_conf) self.globals = g self.app = app def __call__(self, environ, start_response): environ['pylons.environ_config'] = self.econf return self.app(environ, start_response) WSGIResponse = None class LegacyApp(object): def __init__(self, config): global WSGIResponse from paste.wsgiwrappers import WSGIResponse self.app = PylonsApp(config) self.globals = self.app.globals def __call__(self, environ, start_response): environ['pylons.legacy'] = True return self.app(environ, start_response) def make_app(config): """ Legacy WSGI app creator""" warnings.warn( "Legacy WSGI app in use for pre-0.9 application. This will be " "removed at some point post-1.0 which will require minor updates " "to your application.", DeprecationWarning, 2) papp = LegacyApp(config) from paste.deploy.config import ConfigMiddleware app = ConfigMiddleware(papp, { 'default':config.global_conf, 'app':config.app_conf, 'app_conf':config.app_conf, 'global_conf':config.global_conf }) app = RegistryManager(app) app.globals = papp.globals return app PKÇ«'5Ül®:®:pylons/wsgiapp.pyc;ò MïEc@sdZdkZdkZdkZdkZdkZdkZdki Z dk l Z dkl Z dk lZdkZdkZdkZdklZlZlZlZdklZlZdefd„ƒYZd efd „ƒYZead efd „ƒYZd „Z dS(såWSGI App Creator This module is responsible for creating the basic Pylons WSGI application. It's generally assumed that it will be called by Paste, though any WSGI application server could create and call the WSGI app as well. N(sRegistryManager(s WSGIRequest(srequest_config(s ContextObjsAttribSafeContextObjs _Translatorsclass_name_from_module_name(s ControllersWSGIControllersPylonsBaseWSGIAppcBsPtZdZed„Zd„Zd„Zd„Zd„Zd„Z d„Z RS(sáBasic Pylons WSGI Application This basic WSGI app is provided should a web developer want to get access to the most basic Pylons web application environment available. By itself, this Pylons web application does little more than dispatch to a controller and setup the context object, the request object, and the globals object. Additional functionality like sessions, and caching can be setup by altering the ``environ['pylons.environ_config']`` setting to indicate what key the ``session`` and ``cache`` functionality should come from. Resolving the URL and dispatching can be customized by sub-classing or "monkey-patching" this class. Subclassing is the preferred approach. c Csÿ||_||_||_|i}|o$tid|t dƒ||_nt ddd|iƒ|_ d„}||_ |i idƒ}tii|dd |d |d |_x@|i D]5}|ii|dd |d d |d |d qÂWdS( NsThe 'default_charset' keyword argument to the PylonsBaseWSGIApp constructor is deprecated. Please specify 'default_charset' to the Config object in your config/environment.py file instead, e.g.: return pylons.config.Config(myghty, map, paths, default_charset='%s')is content_types text/htmlscharsetcCsti|ƒ‚dS(N(shttpexceptionss HTTPFoundsurl(surl((s>build/bdist.darwin-8.7.0-Power_Macintosh/egg/pylons/wsgiapp.pys redirect_to<sisengines template_rootstemplate_optionssalias(smappersselfsglobalss package_names pylons_configsconfigsdefault_charsetswarningsswarnsDeprecationWarningsdictssettingss redirect_tostemplate_enginesspopsdef_engspylonss templatingsBuffetsbuffetsesprepare( sselfsmappers package_namesglobalssdefault_charsetsdef_engs redirect_tosesconfig((s>build/bdist.darwin-8.7.0-Power_Macintosh/egg/pylons/wsgiapp.pys__init__,s$          c Csþ|i||ƒ|idƒo|i|ƒntiiƒ}t }d|djo|i i dƒo|d}|i d|dbuild/bdist.darwin-8.7.0-Power_Macintosh/egg/pylons/wsgiapp.pys__call__Is>$ $      cCs÷t|ƒ}t|idƒtti|iddt ƒ}y|id}t|ƒWn|id}t|ƒnX|t i jo |t j oti||_nti||_tdtƒƒ}td|iiid|iiiƒ|d<|iiiid ƒo|d|iiid ƒn t |d <|d it i|ƒ|d itii|iƒ|d it i|ƒ|iiio|d it it ƒƒn|d it it!ƒƒ|d it i"|iƒ|d it i#|i#ƒ|i$d ƒos|i%i&ƒ|_'|d it i(i)t*ƒƒ|d it i+t i(i,||ƒƒ|d it i%|i'ƒn|d }|i$d ƒo#|d it i/||d ƒn|i$dƒo#|d it i0||dƒndS(s;Setup and register all the Pylons objects with the registrys .lib.baseshs.config.helperss .lib.helperss translatorsapp_confs global_confsCONFIGslangspaste.registrys pylons.legacyspylons.environ_configssessionscacheN(1s WSGIRequestsenvironsreqs __import__sselfs package_namesgetattrssyssmodulessNonestheir_hs helpers_namespylonsshs_hs_oldhsdicts _Translatorstranssglobalss pylons_configsapp_confs global_confshas_keysregisters translatorspastes wsgiwrappersssettingssrequestsstrict_cscs ContextObjsAttribSafeContextObjsgsbuffetsgetsparamssmixeds_legacy_paramsslegacysresponses WSGIResponsesms Myghty_Compatsstart_responseseconfssessionscache(sselfsenvironsstart_responsestheir_hsreqseconfstranss helpers_name((s>build/bdist.darwin-8.7.0-Power_Macintosh/egg/pylons/wsgiapp.pys setup_app_envusL      #c CsÎtƒ}|i|_||_|i|_|i}| ot Sn||d<|i dƒ}| ot Sn|i d|i ddƒ}t|ƒ|idƒd}t|ƒd}tti||ƒSdS( s#Implements Routes-based dispatchingspylons.routes_dicts controllers .controllers.s/s.iÿÿÿÿs ControllerN(srequest_configsconfigsselfsmappersenvirons redirect_tosredirects mapper_dictsmatchsNonesgets controllers package_namesreplacesfull_module_names __import__ssplits module_namesclass_name_from_module_names class_namesgetattrssyssmodules( sselfsenvironsstart_responsesfull_module_names controllers class_names module_namesconfigsmatch((s>build/bdist.darwin-8.7.0-Power_Macintosh/egg/pylons/wsgiapp.pysresolve°s"       cCs7| otiƒ‚n|d}x8|iƒD]*\}}|oti |ƒ||build/bdist.darwin-8.7.0-Power_Macintosh/egg/pylons/wsgiapp.pysdispatchÉs&  1  ' cCsª|d}|idƒpd}||d<|didƒ od|d|dbuild/bdist.darwin-8.7.0-Power_Macintosh/egg/pylons/wsgiapp.pys fixup_environïs  'cCs|d}tiiƒ|dbuild/bdist.darwin-8.7.0-Power_Macintosh/egg/pylons/wsgiapp.pys load_test_envús  ( s__name__s __module__s__doc__sNones__init__s__call__s setup_app_envsresolvesdispatchs fixup_environs load_test_env(((s>build/bdist.darwin-8.7.0-Power_Macintosh/egg/pylons/wsgiapp.pysPylonsBaseWSGIApps   , ;  & s PylonsAppcBs#tZdZed„Zd„ZRS(sŽSetup the Pylons default environment Pylons App sets up the basic Pylons app, and initializes the global object, sessions and caching. Sessions and caching can be overridden in the config object by supplying other keys to look for in the environ where objects for the session/cache will be. If they're set to none, then no session/cache objects will be available. c Csu||_|o'tid|tdƒ||i_nt}y)t|i dt ƒt ƒdgƒ}Wnt j on)X|i |i|id|ƒ}||_t|i|i |ƒ}|iiƒ|_}|idƒ o9dkl}d|d<|||id t|i}n|id ƒ o3d kl}d |d <|||i|i}n||_ ||_dS( NsThe 'default_charset' keyword argument to the PylonsApp constructor is deprecated. Please specify 'default_charset' to the Config object in your config/environment.py file instead, e.g.: return pylons.config.Config(myghty, map, paths, default_charset='%s')is.lib.app_globalssGlobalssconfigssession(sSessionMiddlewaresbeaker.sessions auto_registerscache(sCacheMiddlewares beaker.cache(sconfigsselfsdefault_charsetswarningsswarnsDeprecationWarningsNonesgs __import__spackagesglobalsslocalss ImportErrorsGlobalss global_confsapp_confs pylons_configsPylonsBaseWSGIAppsmapsappsenviron_configscopyseconfshas_keysbeaker.sessionsSessionMiddlewaresTrues beaker.cachesCacheMiddleware( sselfsconfigsdefault_charsetsgspackageseconfsSessionMiddlewaresCacheMiddlewaresapp((s>build/bdist.darwin-8.7.0-Power_Macintosh/egg/pylons/wsgiapp.pys__init__s2   )       cCs!|i|d<|i||ƒSdS(Nspylons.environ_config(sselfseconfsenvironsappsstart_response(sselfsenvironsstart_response((s>build/bdist.darwin-8.7.0-Power_Macintosh/egg/pylons/wsgiapp.pys__call__9s (s__name__s __module__s__doc__sNones__init__s__call__(((s>build/bdist.darwin-8.7.0-Power_Macintosh/egg/pylons/wsgiapp.pys PylonsApps  (s LegacyAppcBstZd„Zd„ZRS(NcCs/dklat|ƒ|_|ii|_dS(N(s WSGIResponse(spaste.wsgiwrapperss WSGIResponses PylonsAppsconfigsselfsappsglobals(sselfsconfig((s>build/bdist.darwin-8.7.0-Power_Macintosh/egg/pylons/wsgiapp.pys__init__@s cCst|d<|i||ƒSdS(Ns pylons.legacy(sTruesenvironsselfsappsstart_response(sselfsenvironsstart_response((s>build/bdist.darwin-8.7.0-Power_Macintosh/egg/pylons/wsgiapp.pys__call__Fs (s__name__s __module__s__init__s__call__(((s>build/bdist.darwin-8.7.0-Power_Macintosh/egg/pylons/wsgiapp.pys LegacyApp?s cCs‹tidtdƒt|ƒ}dkl}||hd|i<d|i <d|i <d|i<ƒ}t |ƒ}|i |_ |SdS( s Legacy WSGI app creators‘Legacy WSGI app in use for pre-0.9 application. This will be removed at some point post-1.0 which will require minor updates to your application.i(sConfigMiddlewaresdefaultsappsapp_confs global_confN( swarningsswarnsDeprecationWarnings LegacyAppsconfigspappspaste.deploy.configsConfigMiddlewares global_confsapp_confsappsRegistryManagersglobals(sconfigsappsConfigMiddlewarespapp((s>build/bdist.darwin-8.7.0-Power_Macintosh/egg/pylons/wsgiapp.pysmake_appJs    ?  (!s__doc__ssyssresinspectsurllibswarningsspaste.wsgiwrappersspastespaste.httpexceptionsshttpexceptionsspaste.registrysRegistryManagers WSGIRequestsroutessrequest_configspylonsspylons.templatings pylons.legacys pylons.utils ContextObjsAttribSafeContextObjs _Translatorsclass_name_from_module_namespylons.controllerss ControllersWSGIControllersobjectsPylonsBaseWSGIApps PylonsAppsNones WSGIResponses LegacyAppsmake_app(srequest_configsPylonsBaseWSGIAppsWSGIControllers PylonsApps ContextObjsres LegacyAppsurllibsclass_name_from_module_names Controllershttpexceptionssinspectspylonssmake_appswarningssAttribSafeContextObjssyssRegistryManagers _Translatorspastes WSGIRequest((s>build/bdist.darwin-8.7.0-Power_Macintosh/egg/pylons/wsgiapp.pys?s(             ì6 PK‘A'5[Ä$Ö Ö pylons/decorators/__init__.py"""Custom Decorators, currently ``jsonify``, ``validate``, and 2 REST decorators""" import types import simplejson as json import formencode.api as api from formencode import htmlfill import formencode.variabledecode as variabledecode import pylons from pylons.decorator import decorator import rest def jsonify(func, *args, **kw): """Action decorator that formats output for JSON Given a function that will return content, this decorator will turn the result into JSON, with a content-type of 'text/javascript' and output it. """ response = pylons.Response() response.headers['Content-Type'] = 'text/javascript' response.content.append(json.dumps(func(*args, **kw))) return response jsonify = decorator(jsonify) def validate(schema=None, validators=None, form=None, variable_decode=False): """Validate input either for a FormEncode schema, or individual validators Given a form schema or dict of validators, validate will attempt to validate the schema or validator list as long as a POST request is made. No validation is performed on GET requests. If validation was succesfull, the valid result dict will be saved as ``self.form_result``. Otherwise, the action will be re-run as if it was a GET, and the output will be filled by FormEncode's htmlfill to fill in the form field errors. Example: .. code-block:: Python class SomeController(BaseController): def create(self, id): return render_response('/myform.myt') @validate(schema=model.forms.myshema(), form='create') def update(self, id): # Do something with self.form_result pass """ def validate(func, self, *args, **kwargs): defaults, errors = {}, {} if not pylons.request.method == 'POST': return func(self, *args, **kwargs) postvars = pylons.request.POST.copy() if variable_decode: postvars = variabledecode.variable_decode(postvars) defaults.update(postvars) if schema: try: self.form_result = schema.to_python(defaults) except api.Invalid, e: errors = e.unpack_errors(variable_decode) if validators: if isinstance(validators, dict): if not hasattr(self, 'form_result'): self.form_result = {} for field, validator in validators.iteritems(): try: self.form_result[field] = \ validator.to_python(defaults[field] or None) except api.Invalid, error: errors[field] = error if errors: pylons.request.environ['REQUEST_METHOD'] = 'GET' pylons.request.environ['pylons.routes_dict']['action'] = form response = self._dispatch_call() form_content = "".join(response.content) response.content = [htmlfill.render(form_content, defaults, errors)] return response return func(self, *args, **kwargs) return decorator(validate) __all__ = ['jsonify', 'validate', 'rest'] PKÇ«'5¡g­\¦¦pylons/decorators/__init__.pyc;ò ã6Ec@s™dZdkZdkZdkiZdklZdki Z dk Z dk l Z dk Z d„Ze eƒZeeeed„ZdddgZdS( sMCustom Decorators, currently ``jsonify``, ``validate``, and 2 REST decoratorsN(shtmlfill(s decoratorcOsCtiƒ}d|id<|iiti|||Žƒƒ|SdS(sÚAction decorator that formats output for JSON Given a function that will return content, this decorator will turn the result into JSON, with a content-type of 'text/javascript' and output it. stext/javascripts Content-TypeN( spylonssResponsesresponsesheadersscontentsappendsjsonsdumpssfuncsargsskw(sfuncsargsskwsresponse((sJbuild/bdist.darwin-8.7.0-Power_Macintosh/egg/pylons/decorators/__init__.pysjsonify s   "cs#‡‡‡‡d†}t|ƒSdS(s¬Validate input either for a FormEncode schema, or individual validators Given a form schema or dict of validators, validate will attempt to validate the schema or validator list as long as a POST request is made. No validation is performed on GET requests. If validation was succesfull, the valid result dict will be saved as ``self.form_result``. Otherwise, the action will be re-run as if it was a GET, and the output will be filled by FormEncode's htmlfill to fill in the form field errors. Example: .. code-block:: Python class SomeController(BaseController): def create(self, id): return render_response('/myform.myt') @validate(schema=model.forms.myshema(), form='create') def update(self, id): # Do something with self.form_result pass c sâhhf\} }tiidj o||||ŽSntii i ƒ}ˆot i |ƒ}n| i|ƒˆoDyˆi| ƒ|_Wq¾tij o} | iˆƒ}q¾Xnˆotˆtƒo‰t|dƒ o h|_nxhˆiƒD]V\}} y%| i| |ptƒ|i|dZdkZdklZd„Zd„ZddgZdS(sREST decoratorsN(s decoratorcs‡d†}t|ƒSdS(sRestricts access to the function depending on HTTP method Example: .. code-block:: Python class SomeController(BaseController): @pylons.rest.restrict('GET') def comment(self, id): csWtiiˆjo3tiƒ}diˆƒ|id, YEAR. # msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\\n" "POT-Creation-Date: %%(time)s\\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\\n" "Last-Translator: %s <%s>\\n" "Language-Team: LANGUAGE \\n" "MIME-Version: 1.0\\n" "Content-Type: text/plain; charset=UTF-8\\n" "Content-Transfer-Encoding: ENCODING\\n" "Generated-By: Pylons %%(version)s\\n" ''' % ( project, self.distribution.get_author().lower(), self.distribution.get_author_email().lower(), ) # These could be filled in from setup.py pylons.i18n.pygettext.main() print "\nSucessfully created langauage template in %s\n" % pot_path print """Now create your langauge files, save them in i18n/lang replacing lang with the language code and changing the file extension to .po then run setup.py lang_compile mode to produce your .mo files""" sys.argv = oldsys class LangCompile(setuptools.Command): description = "compile strings for internationalisation" user_options = [('lang=', 'l', "language to compile"),] boolean_options = [] def finalize_options(self): pass def initialize_options(self): self.lang = None def compile_lang(self, lang): project = re.compile('[^a-zA-Z0-9_]').sub('', self.distribution.get_name().lower()) lang_path = os.path.join(project, 'i18n', lang) po_path = os.path.join(lang_path, '%s.po' % project) lc_path = os.path.join(lang_path, 'LC_MESSAGES') mo_path = os.path.join(lc_path, '%s.mo' % project) if not os.path.exists(lang_path) or not os.path.exists(po_path): print "Error: Could not find the directory %s" % lang_path sys.exit(1) if not os.path.exists(lc_path): os.mkdir(lc_path) oldsys = sys.argv sys.argv = [sys.argv[0], '-o', mo_path, po_path] import pylons.i18n.msgfmt pylons.i18n.msgfmt.main() print "Sucessfully generated '%s' catalog" % lang sys.argv = oldsys def run(self): project = re.compile('[^a-zA-Z0-9_]').sub('', self.distribution.get_name().lower()) if not self.lang: print "No langauge specified, compiling all languages" i18n_path = os.path.join(project, 'i18n') for lang in os.listdir(i18n_path): if os.path.isdir(os.path.join(i18n_path, lang)) and \ lang not in exclude_dirs: self.compile_lang(lang) else: self.compile_lang(self.lang) PKÇ«'5n…Wé&&pylons/i18n/__init__.pyc;ò EcÝDc@srdZdkZdkZdkZdkZddddfZdeifd„ƒYZdeifd „ƒYZdS( sB Setuptools extensions and tools to add multiple language support Ns .AppleDoubles.svnsCVSs_darcss LangExtractcBs5tZdZgZgZd„Zd„Zd„ZRS(Ns(extract strings for internationalisationcCsdS(N((sself((sDbuild/bdist.darwin-8.7.0-Power_Macintosh/egg/pylons/i18n/__init__.pysinitialize_optionsscCsdS(N((sself((sDbuild/bdist.darwin-8.7.0-Power_Macintosh/egg/pylons/i18n/__init__.pysfinalize_optionssc CsAtidƒid|iiƒiƒƒ}ti i |dti ƒ}d|}ti i ||ƒ}ti i|ƒod|GHtidƒnti}tiidƒtiiddd d |d |d gƒdk}d ||iiƒiƒ|iiƒiƒf|ii_|iiiƒd|GHdGH|t_dS(Ns [^a-zA-Z0-9_]ssi18n%ss%s.potsError: File %s already existsis-Ks-ks_s-os-ps*sÍ# Pylons Project %s Translation File # Copyright (C) YEAR ORGANIZATION # FIRST AUTHOR , YEAR. # msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "POT-Creation-Date: %%(time)s\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: %s <%s>\n" "Language-Team: LANGUAGE \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: ENCODING\n" "Generated-By: Pylons %%(version)s\n" s. Sucessfully created langauage template in %s sÃNow create your langauge files, save them in i18n/lang replacing lang with the language code and changing the file extension to .po then run setup.py lang_compile mode to produce your .mo files(srescompilessubsselfs distributionsget_nameslowersprojectsosspathsjoinsseps i18n_paths pot_filenamespot_pathsexistsssyssexitsargvsoldsysspopsextendspylons.i18n.pygettextspylonss get_authorsget_author_emailsi18ns pygettexts pot_headersmain(sselfspot_pathspylonss pot_filenames i18n_pathsprojectsoldsys((sDbuild/bdist.darwin-8.7.0-Power_Macintosh/egg/pylons/i18n/__init__.pysruns *   ( : (s__name__s __module__s descriptions user_optionssboolean_optionssinitialize_optionssfinalize_optionssrun(((sDbuild/bdist.darwin-8.7.0-Power_Macintosh/egg/pylons/i18n/__init__.pys LangExtract s   s LangCompilecBsJtZdZdddfgZgZd„Zd„Zd„Zd„ZRS( Ns(compile strings for internationalisationslang=slslanguage to compilecCsdS(N((sself((sDbuild/bdist.darwin-8.7.0-Power_Macintosh/egg/pylons/i18n/__init__.pysfinalize_optionsCscCs t|_dS(N(sNonesselfslang(sself((sDbuild/bdist.darwin-8.7.0-Power_Macintosh/egg/pylons/i18n/__init__.pysinitialize_optionsEsc CsDtidƒid|iiƒiƒƒ}ti i |d|ƒ}ti i |d|ƒ}ti i |dƒ}ti i |d|ƒ}ti i|ƒ pti i|ƒ od|GHtidƒnti i|ƒ oti|ƒnti}tid d ||gt_dk}|iiiƒd |GH|t_dS( Ns [^a-zA-Z0-9_]ssi18ns%s.pos LC_MESSAGESs%s.mos&Error: Could not find the directory %siis-os"Sucessfully generated '%s' catalog(srescompilessubsselfs distributionsget_nameslowersprojectsosspathsjoinslangs lang_pathspo_pathslc_pathsmo_pathsexistsssyssexitsmkdirsargvsoldsysspylons.i18n.msgfmtspylonssi18nsmsgfmtsmain( sselfslangslc_pathspylonss lang_pathsprojectsmo_pathspo_pathsoldsys((sDbuild/bdist.darwin-8.7.0-Power_Macintosh/egg/pylons/i18n/__init__.pys compile_langHs *(    cCsÁtidƒid|iiƒiƒƒ}|i oxdGHt i i |dƒ}xkt i |ƒD]F}t i it i i ||ƒƒo |tjo|i|ƒq_q_Wn|i|iƒdS(Ns [^a-zA-Z0-9_]ss.No langauge specified, compiling all languagessi18n(srescompilessubsselfs distributionsget_nameslowersprojectslangsosspathsjoins i18n_pathslistdirsisdirs exclude_dirss compile_lang(sselfslangs i18n_pathsproject((sDbuild/bdist.darwin-8.7.0-Power_Macintosh/egg/pylons/i18n/__init__.pysrun^s* /( s__name__s __module__s descriptions user_optionssboolean_optionssfinalize_optionssinitialize_optionss compile_langsrun(((sDbuild/bdist.darwin-8.7.0-Power_Macintosh/egg/pylons/i18n/__init__.pys LangCompile?s   ( s__doc__s setuptoolsssyssossres exclude_dirssCommands LangExtracts LangCompile(s exclude_dirss LangExtracts LangCompilessyssres setuptoolssos((sDbuild/bdist.darwin-8.7.0-Power_Macintosh/egg/pylons/i18n/__init__.pys?s$6PK’± 5½`*€€pylons/i18n/msgfmt.py#! /usr/bin/env python # -*- coding: iso-8859-1 -*- # Written by Martin v. Löwis """Generate binary message catalog from textual translation description. This program converts a textual Uniforum-style message catalog (.po file) into a binary GNU catalog (.mo file). This is essentially the same function as the GNU msgfmt program, however, it is a simpler implementation. Usage: msgfmt.py [OPTIONS] filename.po Options: -o file --output-file=file Specify the output file to write to. If omitted, output will go to a file named filename.mo (based off the input file name). -h --help Print this message and exit. -V --version Display version information and exit. """ import sys import os import getopt import struct import array __version__ = "1.1" MESSAGES = {} def usage(code, msg=''): print >> sys.stderr, __doc__ if msg: print >> sys.stderr, msg sys.exit(code) def add(id, str, fuzzy): "Add a non-fuzzy translation to the dictionary." global MESSAGES if not fuzzy and str: MESSAGES[id] = str def generate(): "Return the generated output." global MESSAGES keys = MESSAGES.keys() # the keys are sorted in the .mo file keys.sort() offsets = [] ids = strs = '' for id in keys: # For each string, we need size and file offset. Each string is NUL # terminated; the NUL does not count into the size. offsets.append((len(ids), len(id), len(strs), len(MESSAGES[id]))) ids += id + '\0' strs += MESSAGES[id] + '\0' output = '' # The header is 7 32-bit unsigned integers. We don't use hash tables, so # the keys start right after the index tables. # translated string. keystart = 7*4+16*len(keys) # and the values start after the keys valuestart = keystart + len(ids) koffsets = [] voffsets = [] # The string table first has the list of keys, then the list of values. # Each entry has first the size of the string, then the file offset. for o1, l1, o2, l2 in offsets: koffsets += [l1, o1+keystart] voffsets += [l2, o2+valuestart] offsets = koffsets + voffsets output = struct.pack("Iiiiiii", 0x950412deL, # Magic 0, # Version len(keys), # # of entries 7*4, # start of key index 7*4+len(keys)*8, # start of value index 0, 0) # size and offset of hash table output += array.array("i", offsets).tostring() output += ids output += strs return output def make(filename, outfile): ID = 1 STR = 2 # Compute .mo name from .po name and arguments if filename.endswith('.po'): infile = filename else: infile = filename + '.po' if outfile is None: outfile = os.path.splitext(infile)[0] + '.mo' try: lines = open(infile).readlines() except IOError, msg: print >> sys.stderr, msg sys.exit(1) section = None fuzzy = 0 # Parse the catalog lno = 0 for l in lines: lno += 1 # If we get a comment line after a msgstr, this is a new entry if l[0] == '#' and section == STR: add(msgid, msgstr, fuzzy) section = None fuzzy = 0 # Record a fuzzy mark if l[:2] == '#,' and l.find('fuzzy'): fuzzy = 1 # Skip comments if l[0] == '#': continue # Now we are in a msgid section, output previous section if l.startswith('msgid'): if section == STR: add(msgid, msgstr, fuzzy) section = ID l = l[5:] msgid = msgstr = '' # Now we are in a msgstr section elif l.startswith('msgstr'): section = STR l = l[6:] # Skip empty lines l = l.strip() if not l: continue # XXX: Does this always follow Python escape semantics? l = eval(l) if section == ID: msgid += l elif section == STR: msgstr += l else: print >> sys.stderr, 'Syntax error on %s:%d' % (infile, lno), \ 'before:' print >> sys.stderr, l sys.exit(1) # Add last entry if section == STR: add(msgid, msgstr, fuzzy) # Compute output output = generate() try: open(outfile,"wb").write(output) except IOError,msg: print >> sys.stderr, msg def main(): try: opts, args = getopt.getopt(sys.argv[1:], 'hVo:', ['help', 'version', 'output-file=']) except getopt.error, msg: usage(1, msg) outfile = None # parse options for opt, arg in opts: if opt in ('-h', '--help'): usage(0) elif opt in ('-V', '--version'): print >> sys.stderr, "msgfmt.py", __version__ sys.exit(0) elif opt in ('-o', '--output-file'): outfile = arg # do it if not args: print >> sys.stderr, 'No input file given' print >> sys.stderr, "Try `msgfmt --help' for more information." return for filename in args: make(filename, outfile) if __name__ == '__main__': main() PKÇ«'5Ä7pääpylons/i18n/msgfmt.pyc;ò EcÝDc@s‹dZdkZdkZdkZdkZdkZdZhadd„Zd„Z d„Z d„Z d„Z e d jo e ƒndS( sGenerate binary message catalog from textual translation description. This program converts a textual Uniforum-style message catalog (.po file) into a binary GNU catalog (.mo file). This is essentially the same function as the GNU msgfmt program, however, it is a simpler implementation. Usage: msgfmt.py [OPTIONS] filename.po Options: -o file --output-file=file Specify the output file to write to. If omitted, output will go to a file named filename.mo (based off the input file name). -h --help Print this message and exit. -V --version Display version information and exit. Ns1.1scCs6titIJ|oti|IJnti|ƒdS(N(ssyssstderrs__doc__smsgsexitscode(scodesmsg((sBbuild/bdist.darwin-8.7.0-Power_Macintosh/egg/pylons/i18n/msgfmt.pysusage(s cCs!| o|o|t| # # Minimally patched to make it even more xgettext compatible # by Peter Funk # # 2002-11-22 Jürgen Hermann # Added checks that _() only contains string literals, and # command line args are resolved to module lists, i.e. you # can now pass a filename, a module or package name, or a # directory (including globbing chars, important for Win32). # Made docstring fit in 80 chars wide displays using pydoc. # # for selftesting try: import fintl _ = fintl.gettext except ImportError: _ = lambda s: s __doc__ = _("""pygettext -- Python equivalent of xgettext(1) Many systems (Solaris, Linux, Gnu) provide extensive tools that ease the internationalization of C programs. Most of these tools are independent of the programming language and can be used from within Python programs. Martin von Loewis' work[1] helps considerably in this regard. There's one problem though; xgettext is the program that scans source code looking for message strings, but it groks only C (or C++). Python introduces a few wrinkles, such as dual quoting characters, triple quoted strings, and raw strings. xgettext understands none of this. Enter pygettext, which uses Python's standard tokenize module to scan Python source code, generating .pot files identical to what GNU xgettext[2] generates for C and C++ code. From there, the standard GNU tools can be used. A word about marking Python strings as candidates for translation. GNU xgettext recognizes the following keywords: gettext, dgettext, dcgettext, and gettext_noop. But those can be a lot of text to include all over your code. C and C++ have a trick: they use the C preprocessor. Most internationalized C source includes a #define for gettext() to _() so that what has to be written in the source is much less. Thus these are both translatable strings:: gettext("Translatable String") _("Translatable String") Python of course has no preprocessor so this doesn't work so well. Thus, pygettext searches only for _() by default, but see the -k/--keyword flag below for how to augment this. [1] http://www.python.org/workshops/1997-10/proceedings/loewis.html [2] http://www.gnu.org/software/gettext/gettext.html NOTE: pygettext attempts to be option and feature compatible with GNU xgettext where ever possible. However some options are still missing or are not fully implemented. Also, xgettext's use of command line switches with option arguments is broken, and in these cases, pygettext just defines additional switches. Usage: pygettext [options] inputfile ... Options:: -a --extract-all Extract all strings. -d name --default-domain=name Rename the default output file from messages.pot to name.pot. -E --escape Replace non-ASCII characters with octal escape sequences. -D --docstrings Extract module, class, method, and function docstrings. These do not need to be wrapped in _() markers, and in fact cannot be for Python to consider them docstrings. (See also the -X option). -h --help Print this help message and exit. -k word --keyword=word Keywords to look for in addition to the default set, which are: %(DEFAULTKEYWORDS)s You can have multiple -k flags on the command line. -K --no-default-keywords Disable the default set of keywords (see above). Any keywords explicitly added with the -k/--keyword option are still recognized. --no-location Do not write filename/lineno location comments. -n --add-location Write filename/lineno location comments indicating where each extracted string is found in the source. These lines appear before each msgid. The style of comments is controlled by the -S/--style option. This is the default. -o filename --output=filename Rename the default output file from messages.pot to filename. If filename is `-' then the output is sent to standard out. -p dir --output-dir=dir Output files will be placed in directory dir. -S stylename --style stylename Specify which style to use for location comments. Two styles are supported: Solaris # File: filename, line: line-number GNU #: filename:line The style name is case insensitive. GNU style is the default. -v --verbose Print the names of the files being processed. -V --version Print the version of pygettext and exit. -w columns --width=columns Set width of output to columns. -x filename --exclude-file=filename Specify a file that contains a list of strings that are not be extracted from the input files. Each string to be excluded must appear on a line by itself in the file. -X filename --no-docstrings=filename Specify a file that contains a list of files (one per line) that should not have their docstrings extracted. This is only useful in conjunction with the -D option above. If `inputfile' is -, standard input is read. """) import os import imp import sys import glob import time import getopt import token import tokenize import operator __version__ = '1.5' default_keywords = ['_'] DEFAULTKEYWORDS = ', '.join(default_keywords) EMPTYSTRING = '' # The normal pot-file header. msgmerge and Emacs's po-mode work better if it's # there. pot_header = _('''\ # SOME DESCRIPTIVE TITLE. # Copyright (C) YEAR ORGANIZATION # FIRST AUTHOR , YEAR. # msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\\n" "POT-Creation-Date: %(time)s\\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\\n" "Last-Translator: FULL NAME \\n" "Language-Team: LANGUAGE \\n" "MIME-Version: 1.0\\n" "Content-Type: text/plain; charset=CHARSET\\n" "Content-Transfer-Encoding: ENCODING\\n" "Generated-By: pygettext.py %(version)s\\n" ''') def usage(code, msg=''): print >> sys.stderr, __doc__ % globals() if msg: print >> sys.stderr, msg sys.exit(code) escapes = [] def make_escapes(pass_iso8859): global escapes if pass_iso8859: # Allow iso-8859 characters to pass through so that e.g. 'msgid # "Höhe"' would result not result in 'msgid "H\366he"'. Otherwise we # escape any character outside the 32..126 range. mod = 128 else: mod = 256 for i in range(256): if 32 <= (i % mod) <= 126: escapes.append(chr(i)) else: escapes.append("\\%03o" % i) escapes[ord('\\')] = '\\\\' escapes[ord('\t')] = '\\t' escapes[ord('\r')] = '\\r' escapes[ord('\n')] = '\\n' escapes[ord('\"')] = '\\"' def escape(s): global escapes s = list(s) for i in range(len(s)): s[i] = escapes[ord(s[i])] return EMPTYSTRING.join(s) def safe_eval(s): # unwrap quotes, safely return eval(s, {'__builtins__':{}}, {}) def normalize(s): # This converts the various Python string types into a format that is # appropriate for .po files, namely much closer to C style. lines = s.split('\n') if len(lines) == 1: s = '"' + escape(s) + '"' else: if not lines[-1]: del lines[-1] lines[-1] = lines[-1] + '\n' for i in range(len(lines)): lines[i] = escape(lines[i]) lineterm = '\\n"\n"' s = '""\n"' + lineterm.join(lines) + '"' return s def containsAny(str, set): """Check whether 'str' contains ANY of the chars in 'set'""" return 1 in [c in str for c in set] def _visit_pyfiles(list, dirname, names): """Helper for getFilesForName().""" # get extension for python source files if not globals().has_key('_py_ext'): global _py_ext _py_ext = [triple[0] for triple in imp.get_suffixes() if triple[2] == imp.PY_SOURCE][0] # don't recurse into CVS directories if 'CVS' in names: names.remove('CVS') # add all *.py files to list list.extend( [os.path.join(dirname, file) for file in names if os.path.splitext(file)[1] == _py_ext] ) def _get_modpkg_path(dotted_name, pathlist=None): """Get the filesystem path for a module or a package. Return the file system path to a file for a module, and to a directory for a package. Return None if the name is not found, or is a builtin or extension module. """ # split off top-most name parts = dotted_name.split('.', 1) if len(parts) > 1: # we have a dotted path, import top-level package try: file, pathname, description = imp.find_module(parts[0], pathlist) if file: file.close() except ImportError: return None # check if it's indeed a package if description[2] == imp.PKG_DIRECTORY: # recursively handle the remaining name parts pathname = _get_modpkg_path(parts[1], [pathname]) else: pathname = None else: # plain name try: file, pathname, description = imp.find_module( dotted_name, pathlist) if file: file.close() if description[2] not in [imp.PY_SOURCE, imp.PKG_DIRECTORY]: pathname = None except ImportError: pathname = None return pathname def getFilesForName(name): """Get a list of module files for a filename, a module or package name, or a directory. """ if not os.path.exists(name): # check for glob chars if containsAny(name, "*?[]"): files = glob.glob(name) list = [] for file in files: list.extend(getFilesForName(file)) return list # try to find module or package name = _get_modpkg_path(name) if not name: return [] if os.path.isdir(name): # find all python files in directory list = [] os.path.walk(name, _visit_pyfiles, list) return list elif os.path.exists(name): # a single file return [name] return [] class TokenEater: def __init__(self, options): self.__options = options self.__messages = {} self.__state = self.__waiting self.__data = [] self.__lineno = -1 self.__freshmodule = 1 self.__curfile = None def __call__(self, ttype, tstring, stup, etup, line): # dispatch ## import token ## print >> sys.stderr, 'ttype:', token.tok_name[ttype], \ ## 'tstring:', tstring self.__state(ttype, tstring, stup[0]) def __waiting(self, ttype, tstring, lineno): opts = self.__options # Do docstring extractions, if enabled if opts.docstrings and not opts.nodocstrings.get(self.__curfile): # module docstring? if self.__freshmodule: if ttype == tokenize.STRING: self.__addentry(safe_eval(tstring), lineno, isdocstring=1) self.__freshmodule = 0 elif ttype not in (tokenize.COMMENT, tokenize.NL): self.__freshmodule = 0 return # class docstring? if ttype == tokenize.NAME and tstring in ('class', 'def'): self.__state = self.__suiteseen return if ttype == tokenize.NAME and tstring in opts.keywords: self.__state = self.__keywordseen def __suiteseen(self, ttype, tstring, lineno): # ignore anything until we see the colon if ttype == tokenize.OP and tstring == ':': self.__state = self.__suitedocstring def __suitedocstring(self, ttype, tstring, lineno): # ignore any intervening noise if ttype == tokenize.STRING: self.__addentry(safe_eval(tstring), lineno, isdocstring=1) self.__state = self.__waiting elif ttype not in (tokenize.NEWLINE, tokenize.INDENT, tokenize.COMMENT): # there was no class docstring self.__state = self.__waiting def __keywordseen(self, ttype, tstring, lineno): if ttype == tokenize.OP and tstring == '(': self.__data = [] self.__lineno = lineno self.__state = self.__openseen else: self.__state = self.__waiting def __openseen(self, ttype, tstring, lineno): if ttype == tokenize.OP and tstring == ')': # We've seen the last of the translatable strings. Record the # line number of the first line of the strings and update the list # of messages seen. Reset state for the next batch. If there # were no strings inside _(), then just ignore this entry. if self.__data: self.__addentry(EMPTYSTRING.join(self.__data)) self.__state = self.__waiting elif ttype == tokenize.STRING: self.__data.append(safe_eval(tstring)) elif ttype not in [tokenize.COMMENT, token.INDENT, token.DEDENT, token.NEWLINE, tokenize.NL]: # warn if we see anything else than STRING or whitespace print >> sys.stderr, _( '*** %(file)s:%(lineno)s: Seen unexpected token "%(token)s"' ) % { 'token': tstring, 'file': self.__curfile, 'lineno': self.__lineno } self.__state = self.__waiting def __addentry(self, msg, lineno=None, isdocstring=0): if lineno is None: lineno = self.__lineno if not msg in self.__options.toexclude: entry = (self.__curfile, lineno) self.__messages.setdefault(msg, {})[entry] = isdocstring def set_filename(self, filename): self.__curfile = filename self.__freshmodule = 1 def write(self, fp): options = self.__options timestamp = time.strftime('%Y-%m-%d %H:%M+%Z') # The time stamp in the header doesn't have the same format as that # generated by xgettext... print >> fp, pot_header % {'time': timestamp, 'version': __version__} # Sort the entries. First sort each particular entry's keys, then # sort all the entries by their first item. reverse = {} for k, v in self.__messages.items(): keys = v.keys() keys.sort() reverse.setdefault(tuple(keys), []).append((k, v)) rkeys = reverse.keys() rkeys.sort() for rkey in rkeys: rentries = reverse[rkey] rentries.sort() for k, v in rentries: isdocstring = 0 # If the entry was gleaned out of a docstring, then add a # comment stating so. This is to aid translators who may wish # to skip translating some unimportant docstrings. if reduce(operator.__add__, v.values()): isdocstring = 1 # k is the message string, v is a dictionary-set of (filename, # lineno) tuples. We want to sort the entries in v first by # file name and then by line number. v = v.keys() v.sort() if not options.writelocations: pass # location comments are different b/w Solaris and GNU: elif options.locationstyle == options.SOLARIS: for filename, lineno in v: d = {'filename': filename, 'lineno': lineno} print >>fp, _( '# File: %(filename)s, line: %(lineno)d') % d elif options.locationstyle == options.GNU: # fit as many locations on one line, as long as the # resulting line length doesn't exceeds 'options.width' locline = '#:' for filename, lineno in v: d = {'filename': filename, 'lineno': lineno} s = _(' %(filename)s:%(lineno)d') % d if len(locline) + len(s) <= options.width: locline = locline + s else: print >> fp, locline locline = "#:" + s if len(locline) > 2: print >> fp, locline if isdocstring: print >> fp, '#, docstring' print >> fp, 'msgid', normalize(k) print >> fp, 'msgstr ""\n' def main(): global default_keywords try: opts, args = getopt.getopt( sys.argv[1:], 'ad:DEhk:Kno:p:S:Vvw:x:X:', ['extract-all', 'default-domain=', 'escape', 'help', 'keyword=', 'no-default-keywords', 'add-location', 'no-location', 'output=', 'output-dir=', 'style=', 'verbose', 'version', 'width=', 'exclude-file=', 'docstrings', 'no-docstrings', ]) except getopt.error, msg: usage(1, msg) # for holding option values class Options: # constants GNU = 1 SOLARIS = 2 # defaults extractall = 0 # FIXME: currently this option has no effect at all. escape = 0 keywords = [] outpath = '' outfile = 'messages.pot' writelocations = 1 locationstyle = GNU verbose = 0 width = 78 excludefilename = '' docstrings = 0 nodocstrings = {} options = Options() locations = {'gnu' : options.GNU, 'solaris' : options.SOLARIS, } # parse options for opt, arg in opts: if opt in ('-h', '--help'): usage(0) elif opt in ('-a', '--extract-all'): options.extractall = 1 elif opt in ('-d', '--default-domain'): options.outfile = arg + '.pot' elif opt in ('-E', '--escape'): options.escape = 1 elif opt in ('-D', '--docstrings'): options.docstrings = 1 elif opt in ('-k', '--keyword'): options.keywords.append(arg) elif opt in ('-K', '--no-default-keywords'): default_keywords = [] elif opt in ('-n', '--add-location'): options.writelocations = 1 elif opt in ('--no-location',): options.writelocations = 0 elif opt in ('-S', '--style'): options.locationstyle = locations.get(arg.lower()) if options.locationstyle is None: usage(1, _('Invalid value for --style: %s') % arg) elif opt in ('-o', '--output'): options.outfile = arg elif opt in ('-p', '--output-dir'): options.outpath = arg elif opt in ('-v', '--verbose'): options.verbose = 1 elif opt in ('-V', '--version'): print _('pygettext.py (xgettext for Python) %s') % __version__ sys.exit(0) elif opt in ('-w', '--width'): try: options.width = int(arg) except ValueError: usage(1, _('--width argument must be an integer: %s') % arg) elif opt in ('-x', '--exclude-file'): options.excludefilename = arg elif opt in ('-X', '--no-docstrings'): fp = open(arg) try: while 1: line = fp.readline() if not line: break options.nodocstrings[line[:-1]] = 1 finally: fp.close() # calculate escapes make_escapes(options.escape) # calculate all keywords options.keywords.extend(default_keywords) # initialize list of strings to exclude if options.excludefilename: try: fp = open(options.excludefilename) options.toexclude = fp.readlines() fp.close() except IOError: print >> sys.stderr, _( "Can't read --exclude-file: %s") % options.excludefilename sys.exit(1) else: options.toexclude = [] # resolve args to module lists expanded = [] for arg in args: if arg == '-': expanded.append(arg) else: expanded.extend(getFilesForName(arg)) args = expanded # slurp through all the files eater = TokenEater(options) for filename in args: if filename == '-': if options.verbose: print _('Reading standard input') fp = sys.stdin closep = 0 else: if options.verbose: print _('Working on %s') % filename fp = open(filename) closep = 1 try: eater.set_filename(filename) try: tokenize.tokenize(fp.readline, eater) except tokenize.TokenError, e: print >> sys.stderr, '%s: %s, line %d, column %d' % ( e[0], filename, e[1][0], e[1][1]) finally: if closep: fp.close() # write the output if options.outfile == '-': fp = sys.stdout closep = 0 else: if options.outpath: options.outfile = os.path.join(options.outpath, options.outfile) fp = open(options.outfile, 'w') closep = 1 try: eater.write(fp) finally: if closep: fp.close() if __name__ == '__main__': main() # some more test strings _(u'a unicode string') # this one creates a warning _('*** Seen unexpected token "%(token)s"') % {'token': 'test'} _('more' 'than' 'one' 'string') PKÇ«'5vÜåùŒYŒYpylons/i18n/pygettext.pyc;ò EcÝDc@s‚ydkZeiZWnej od„ZnXedƒZdkZdkZdkZdkZdk Z dk Z dk Z dk Z dk Z dZdgaditƒZdZedƒZdd„Zgad „Zd „Zd „Zd „Zd „Zd„Zed„Zd„Zdfd„ƒYZd„Z e!djo6e ƒedƒedƒhdd<edƒndS(NcCs|S(N(ss(ss((sEbuild/bdist.darwin-8.7.0-Power_Macintosh/egg/pylons/i18n/pygettext.pyssspygettext -- Python equivalent of xgettext(1) Many systems (Solaris, Linux, Gnu) provide extensive tools that ease the internationalization of C programs. Most of these tools are independent of the programming language and can be used from within Python programs. Martin von Loewis' work[1] helps considerably in this regard. There's one problem though; xgettext is the program that scans source code looking for message strings, but it groks only C (or C++). Python introduces a few wrinkles, such as dual quoting characters, triple quoted strings, and raw strings. xgettext understands none of this. Enter pygettext, which uses Python's standard tokenize module to scan Python source code, generating .pot files identical to what GNU xgettext[2] generates for C and C++ code. From there, the standard GNU tools can be used. A word about marking Python strings as candidates for translation. GNU xgettext recognizes the following keywords: gettext, dgettext, dcgettext, and gettext_noop. But those can be a lot of text to include all over your code. C and C++ have a trick: they use the C preprocessor. Most internationalized C source includes a #define for gettext() to _() so that what has to be written in the source is much less. Thus these are both translatable strings:: gettext("Translatable String") _("Translatable String") Python of course has no preprocessor so this doesn't work so well. Thus, pygettext searches only for _() by default, but see the -k/--keyword flag below for how to augment this. [1] http://www.python.org/workshops/1997-10/proceedings/loewis.html [2] http://www.gnu.org/software/gettext/gettext.html NOTE: pygettext attempts to be option and feature compatible with GNU xgettext where ever possible. However some options are still missing or are not fully implemented. Also, xgettext's use of command line switches with option arguments is broken, and in these cases, pygettext just defines additional switches. Usage: pygettext [options] inputfile ... Options:: -a --extract-all Extract all strings. -d name --default-domain=name Rename the default output file from messages.pot to name.pot. -E --escape Replace non-ASCII characters with octal escape sequences. -D --docstrings Extract module, class, method, and function docstrings. These do not need to be wrapped in _() markers, and in fact cannot be for Python to consider them docstrings. (See also the -X option). -h --help Print this help message and exit. -k word --keyword=word Keywords to look for in addition to the default set, which are: %(DEFAULTKEYWORDS)s You can have multiple -k flags on the command line. -K --no-default-keywords Disable the default set of keywords (see above). Any keywords explicitly added with the -k/--keyword option are still recognized. --no-location Do not write filename/lineno location comments. -n --add-location Write filename/lineno location comments indicating where each extracted string is found in the source. These lines appear before each msgid. The style of comments is controlled by the -S/--style option. This is the default. -o filename --output=filename Rename the default output file from messages.pot to filename. If filename is `-' then the output is sent to standard out. -p dir --output-dir=dir Output files will be placed in directory dir. -S stylename --style stylename Specify which style to use for location comments. Two styles are supported: Solaris # File: filename, line: line-number GNU #: filename:line The style name is case insensitive. GNU style is the default. -v --verbose Print the names of the files being processed. -V --version Print the version of pygettext and exit. -w columns --width=columns Set width of output to columns. -x filename --exclude-file=filename Specify a file that contains a list of strings that are not be extracted from the input files. Each string to be excluded must appear on a line by itself in the file. -X filename --no-docstrings=filename Specify a file that contains a list of files (one per line) that should not have their docstrings extracted. This is only useful in conjunction with the -D option above. If `inputfile' is -, standard input is read. s1.5s_s, ssÚ# SOME DESCRIPTIVE TITLE. # Copyright (C) YEAR ORGANIZATION # FIRST AUTHOR , YEAR. # msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "POT-Creation-Date: %(time)s\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=CHARSET\n" "Content-Transfer-Encoding: ENCODING\n" "Generated-By: pygettext.py %(version)s\n" cCs=tittƒIJ|oti|IJnti|ƒdS(N(ssyssstderrs__doc__sglobalssmsgsexitscode(scodesmsg((sEbuild/bdist.darwin-8.7.0-Power_Macintosh/egg/pylons/i18n/pygettext.pysusageÇscCsÌ|o d}nd}x^tdƒD]P}d||jo djnotit|ƒƒq$tid|ƒq$Wdttdƒ | i| iƒ| _nt$| idDƒ}d}z|i?|ƒWd|o|i)ƒnXdS(ENisad:DEhk:Kno:p:S:Vvw:x:X:s extract-allsdefault-domain=sescapeshelpskeyword=sno-default-keywordss add-locations no-locationsoutput=s output-dir=sstyle=sverbosesversionswidth=s exclude-file=s docstringss no-docstringssOptionscBs\tZdZdZdZdZgZdZdZdZ eZ dZ dZ dZ dZhZRS(Niiiss messages.potiN(s__name__s __module__sGNUsSOLARISs extractallsescapeskeywordssoutpathsoutfileswritelocationss locationstylesverboseswidthsexcludefilenames docstringss nodocstrings(((sEbuild/bdist.darwin-8.7.0-Power_Macintosh/egg/pylons/i18n/pygettext.pysOptions ssgnussolariss-hs--helpis-as --extract-alls-ds--default-domains.pots-Es--escapes-Ds --docstringss-ks --keywords-Ks--no-default-keywordss-ns--add-locations --no-locations-Ss--stylesInvalid value for --style: %ss-os--outputs-ps --output-dirs-vs --verboses-Vs --versions%pygettext.py (xgettext for Python) %ss-ws--widths'--width argument must be an integer: %ss-xs--exclude-files-Xs--no-docstringsiÿÿÿÿsCan't read --exclude-file: %ss-sReading standard inputs Working on %ss%s: %s, line %d, column %dsw(@sgetoptssyssargvsoptssargsserrorsmsgsusagesOptionssoptionssGNUsSOLARISs locationssoptsargs extractallsoutfilesescapes docstringsskeywordssappendsdefault_keywordsswritelocationssgetslowers locationstylesNones_soutpathsverboses __version__sexitsintswidths ValueErrorsexcludefilenamesopensfpsreadlineslines nodocstringsscloses make_escapessextends readliness toexcludesIOErrorsstderrsexpandedsgetFilesForNames TokenEaterseatersfilenamesstdinscloseps set_filenamestokenizes TokenErrorsesstdoutsosspathsjoinswrite(sfps locationssargsclosepsfilenamesoptseatersargssmsgslinesOptionssesexpandedsoptionssopts((sEbuild/bdist.darwin-8.7.0-Power_Macintosh/egg/pylons/i18n/pygettext.pysmainùsàF                           :   "s__main__ua unicode strings%*** Seen unexpected token "%(token)s"stokenstestsmorethanonestring("sfintlsgettexts_s ImportErrors__doc__sossimpssyssglobstimesgetoptstokenstokenizesoperators __version__sdefault_keywordssjoinsDEFAULTKEYWORDSs EMPTYSTRINGs pot_headersusagesescapess make_escapessescapes safe_evals normalizes containsAnys_visit_pyfilessNones_get_modpkg_pathsgetFilesForNames TokenEatersmains__name__(s_visit_pyfilessescapesoperators normalizesDEFAULTKEYWORDSsimpsfintlstokenizesusagesgetopts __version__s__doc__sgetFilesForNames pot_headersglobs make_escapesssyss TokenEaters_s safe_evalsmains_get_modpkg_paths EMPTYSTRINGs containsAnystokenstimesos((sEbuild/bdist.darwin-8.7.0-Power_Macintosh/egg/pylons/i18n/pygettext.pys?sH   ‡                   ' ˜ ž  PK’± 5o¾Ý¯¯pylons/i18n/translation.pyimport os from gettext import * from pkg_resources import resource_stream def egg_translation(domain, lang): """ This method doesn't do all the checking etc of the gettext.translation method but it seems to work. We can't just use gettext.translation because the .mo files might be in eggs """ class_ = GNUTranslations return class_(resource_stream(domain, os.path.join(lang, '%s.mo' % domain))) PKÇ«'5¯÷Ñ凇pylons/i18n/translation.pyc;ò EcÝDc@s*dkZdkTdklZd„ZdS(N(s*(sresource_streamcCs0t}|t|tii|d|ƒƒƒSdS(sÇ This method doesn't do all the checking etc of the gettext.translation method but it seems to work. We can't just use gettext.translation because the .mo files might be in eggs s%s.moN(sGNUTranslationssclass_sresource_streamsdomainsosspathsjoinslang(sdomainslangsclass_((sGbuild/bdist.darwin-8.7.0-Power_Macintosh/egg/pylons/i18n/translation.pysegg_translations(sossgettexts pkg_resourcessresource_streamsegg_translation(sresource_streamsossegg_translation((sGbuild/bdist.darwin-8.7.0-Power_Macintosh/egg/pylons/i18n/translation.pys?s  PK’± 5­ Žþþpylons/media/img/bar-bg.png‰PNG  IHDRfŒmÌF,tEXtCreation TimeSat 26 Nov 2005 00:07:39 -00008‰8ötIMEÖ 0"5 H pHYs ð ðB¬4˜gAMA± üaUIDATxÚí‘IRÃ0EåNÛŽí É8(§ã0d £ÇÈÝÖ`íØQEU´Ò«þzú²£Ï÷b · „òëŽZk²Ø ŠË­,Ö¼§¹¨¶2_£É¯ÀüÍ¡Uíäè# ™V{™¯ŒOˆz/³šÖ;¯Àl9B}|õ¡Ï–ó4n¾ûéëÄä°90Œ¾éËͱ§kµšÙË Ø÷¶§>}v¾öÈàÀàÇ~æjÅÜžUºÚó¼;ëd™ ¶'•Ìiâ|Þ×]*e}÷‹Šç€bHv7•Ì€öÔWwW•<0¾îÚÇ3ð- p{q¿)Û‡¡ÒqÙß(Ke‚ÜO– ×'Y$Ü)œL#ï“•}²¡+lyYkÎ+%úFÓ)5G†Tç·úV@4ƒ8s¿ùaô°>Ã{Sú×Ýßô{ø¾îûÌUS/Å?2IEND®B`‚PK’± 5ùû6HG)G)pylons/media/img/bg.jpgÿØÿàJFIFddÿìDuckyXÿîAdobedÀÿÛ„  ÿÀYcÿÄ”  a!Qð1q‘A"¡2Br#3±R‚³$tu6ÁÑb457ñ’²cs´%¢!1AQaqÿÚ ?þW©l)l)l)l)l)l)l)l)l)l)l)l)l)l)l)l)l)l)l)l)l)l)l)l)l)l)l`:YÊdhÎMLíâLnø9£‘øûóTgÁ>EAö–Á–Áo¸{^ø!è¹`eÃZæÚÝ8Ýæ8y~*Á©»eÙnÖîfb®£¥ ܬ†ñ‡÷nëàǵßoeo"åÞ]ã2®+î«ñ »¤6‹O˜i üÄ{$‚½CûxbÎe"·ÆÅÆÛ±ê¼ÿïÈÑó|øñ(-0w$ÆÁÛ}£q, ÐD\Ám×â80su·Ô,â–Ó¼Ãt–Aöèá÷§€ì ï8æûŽç!¯œM= ôЗ+¢bϲ;sÐèñ±Îáø¥˜™®Žá÷)´Z#¶Ž&Ecc|˜ÐØélGå±âÿ² i†F4ò%§CöE#”‚ïî ]Ñ&:Û3£Àcøz€à>Åpbv „wQÜ>êGHÌ$ò3a+CD5B?œu#—¢B÷9ŠÉßÒ’äMŒÇÈ:,áionÇN†zyð'`˜%ÄýÍ“:YããÁÚŸ+»­%œ¡iÐÖ*`¯å0±d.ײeoúCò¹ ßû(O[tc^ïÑj£U¿“fÑžf’ 4tö½Z:F립#C¸â¨¿öÕ†2û ks.*kq§6BÊgõ3tŒaËŽ 5(¸Ûa¦™¦ãÝ—/Àt wLnÄ8k÷ê ‡Éöïvœ¦.þ×! ä–ä6k ±ƒÔZö‡憪‰óyÜð1bº#ð {¶ëö‰Õ0cÛ÷Tr1®Ÿ} ìÍ·ªÆ>3£Æ¬$Ƀ)×Û®ê_‹báE$<¦Ð™D¥¾OwÑùl•¼åÿ­•¤Ÿ³]S0áÃB>*;÷®ý½VŒ£mtêÖR7É’«š?Tñ[ƒvàoÎw i‘Ð’á§­œžÂZtÛQÁfÁ4ØÉh% ˆÝAÕB7: æŒÂÜPwÒØ RØ RØ RØ RØ RØ RØ RØ RØ RØ RØ RØ RØ RØ RØ RØ RØ RØ RØ RØ RØ RØ RØ RØ RØ RØ RØ RØ RØ RØ RØ RØ RØ RØ RØ RØ RØ RØ RØ RØ RØ RØ RØ RØ RØ RØ RØ RØ RØ •¢ Q@¢EŠ (P( Q@¢EŠ (P( Q@¢EŠ (P( Q@¢ƒåGRv=ç_ù ¯^ãåú¤ûzyQ#Gƪ´PuÉnç4ôðxâÒy„YœIÍáîìXÿ˾韲€zÓ«u¨Ô6Ý£ŒÂ¬½Ú]{sjÖM¼RÙasà õàI^ˆ9ÑP|1 <óAæ¬]ë_–¸·‹ìÍƒß µÇ‡Ód|†“¥ø:ˆì¶2ì-³ñw Ååu‡#Ðü¬çÉ m#RY© ùnŒl³e"ǾÞÄ?åð…î#àC´q>«#îO$þ¸ñ˜bÛ¼µãIaŽÞ/#4š|òÁ0BYbY{׈´{Ÿ‡¶y9Ì¡ É‘¸×W³«ù þ#ýñTT¾£Aq‡Ëaò¶!tPŒ¨è-òü$OD‚W±íŸƒÉM†’a5¦^Þ+Ì]Àü!ºHOŸäJ6ÖÒéæp×ZÞ ¾…Ôå¤yùyBƒžnÉß3—¶Ô|Í"†·ãÀüŽÓÕ©Àë°Ïc¯Bbìe÷_Gðë­"˜ñÑ¥ Ÿ˜†‰‚ò˄Ìîœ>]‘Ë#ÉѰÜÙõkä´îB¿íÞWÞJÙÍwDdcõÓ›x©‚Ÿ‘Év‰t˜ø/dÓñ63ÿéý*ò*ò GF¶®¡/?,¶÷7$ŸPÆ–üÊŠ¶Yù[ç·1¾½¾kâǽâQå .v s#OŠA°þžäeÍÆ3)á°´·a¶‚VˆÜΧ|¥£@\J—Ô¼ƒäþ-ãñä ëšßBÉÀ=Pë®í>a}¨>Ñ@¢EŠ (P( Q@¢EŠ (P( Q@¢EŠ (P( Q@¢EŠ (P( Q@¢EŠ (P( Q@¢EŠ (P( ’¢(„ !ˆ@¢(„ !ˆ@¢(„ !ˆ@¢(„ !ˆ@¢(„ !ˆ@¢(„ !ˆ@¢(„ !ˆAÅÐ5ÀµÀ9®8" £(“ã¶~¯¶ôÚÊKœZ˜ãÿ¤ýˆ$h…ˆAŒc£.®pÍÀk¯ ûÿ•Q¢{šâ&÷ë¢îX>! 2Ú'8†ÇÐH4#€wµ:{k7í~â8Œ½ÑŸpáe{ÜèØ×~îXÉáÒíGI`ô‰®Í ƒÄx°>ÑBƒƒ 'BݼG$„@€G‘TR»Žå÷ï›a3¡kZjú#«álœ#…ŸñÊxl8«ÚØÜ&në·23¿/kñ924tS AƒÀõù}‰¢N{fCÚHng³|ÓIŽÉ´ÌetrGF²uè:ÁAgÍž5¶ö¶×ÍÊä2é°°šÙ®$ó9Îah h–sÁX8bðÐZKŒE× Ç8ÍvñóÜ^ÍÇ­Çâ@:í¨ä‚µßt,2ݱºn¶S¾k;óäDsà~„uÌ$NñžL]•åóºr.ž »)@Ñ’Ë ¬×C$|]ÉÍ<°[lEÔ¦ÙÜ~w¹ûŽå¾É†ë>ÑÃV†´ùæ´þ'q<¢ÄvÆ:8ç»m¥»52\Îð4‡‹žâx¹Îg†ÜUiŒÀ±ã-a’³–ß3¸ºÇ@òcëdc®Fé§™gÌ=¨Ù½¯Û?æÛÆ]Ûæ$mèä±¹‚+È# 4<Ð|ôfÜ¢@öŸwcÁ6DZé:Ë-.¦´ÐkåNQ,zm¢ldÎw¦$Lë¼uÄñ0ƒ5£eh?ü¶®ûú îê:é·9\aè|n²)['S\4sLrˆŸåçÁ0Vûk¹òI‘ÁöÝ›ó“O+޼Ùe®tÚñÔh5ãÄê– Þ3±ª^ã¹cû¸Ët¶ƒf0ù鿲š/¢ P)lPy{»qw›Ý̼²m8 ºÇ€uj[§ u‹s˜:{Ö8Ý’²î\[L6¹¦6âNÍ:¼¸ߪ°z ´òÑç°–Wí&´é»o)™Áÿæxý« É£toŠf‚Y¯LÃOÑw‘û ƒ&–Å–Å–Å–Å–Å–Å–Å–Å–Å–Å–Å–Å–Å–Å–Å–Å–Å–Å–Å–Å–Å–Å–Å–Å–Å–Å–Å–Å–Å–Å–Å–Å–Å–Å–Å–Å–Å–Å–Å–Å–Å–Å–Å–Å–Å–Å–Å–Å(ìGd ; QÙŽÈv@£²(ìGd ; QÙŽÈv@£²(ìGd ; QÙŽÈv@£²(ìGd ; QÙŽÈ:å´ŽxÝ­êc¼Æ¤{Ä Ä·22SgvA›‰·”,cîêö Ï£²‰­¸¶hÙÕ,z€5Ó©§ÌrAZ¸ìnÓÈ1Ò» Làš¬3«¾'¤H<ÕÚ0~ŸÞÚÝaF1‚8ïpu½ì Ѥô!hÓñ=õJ/TvP(ìGd^õ”ÚöÞDDî›»¦ˆl×8Hùä:5¬èùº¹iüŠÎÄGjâçÄ`†c2Ù§Î]ÆÆJ&$ÌÖ4ôÃyqÐó$êR‹Ž.ÁÖ¶ŒŠmtâ_{ <3ø¸Ž†¾[()_SmZÜ®HÄÙ†"òÞy!vº=šô9¿n¼Uò4æC)†ÍvíÕÎFêâ~â…íniÛZ°€Ö—CâOV¾‰Ï§rå#ÇÝÁù™1Xˉ‡VV+'ÜH÷††– ­fƒN%¥(Û›>Ðdÿ˜†þ,–H;¤ÝÝ\V¹×È ­ãðh <‹eÔ¶ÖVÓÞ]JØm­Ú_4Î<ÖIPjÜ"ç½3C»óP˜ñ§NÛÆ¸ð!§÷Ž£]ÎÁjÜV1“Ø]a»žÄÒž'e”|Ó×?xO#‡Ó\í˜Ìä°±Çùx2š]XÁ¯Ë½ËÛâ6 ê ãGe‘_Ïw· ©’¹ ™ÃX,™óM)ø´)à’ $½Üúè.3±G€ÁÁkz¯%oíÄ|¼?ðZÜ'Æam¿)Œ³e¤$êæ·]\í4ÕÄñ%gD•(ìGd>ÿìù»£ v= ÈÙIÕl^âÖ–»ƒÛ®‡cö+. LþÍîKKk.ß̾°Âî%¹Õ$ˆ\SK´ùz¸ÊÖÁ¿ñø;<6:ÖÃ(,F±ñùœH»™?†È¯xü ‹_Ú1ìpÒKwäâG‘ûG4v@£²(ìGd ; QÙŽÈv@£²(ìGd ; QÙŽÈv@£²(ìGd ; QÙŽÈv@£²(ìGd ; QÙŽÈv@£²(ìGd ; QÙŽÈv@£²(ìGd ; QÙ­-ŠKbKbKbKbKbKbKbKbKbKbKbKbKbKbKbKbKbKbKbKbKbKbKbKbKbKbKbKbKbKbƒ¢âÍ—1:'õ4 ^ÓÒæ¸qÉU³ž]ùk‘¥Ó©p2AåÔÝ~ñðA™KbƒZ:9C¡ù#y&htàIãÔ4ø Š²í« c-ÝgVÆR.ÝÆG‰ŸÖðò4êÔŸ’º&¢èš6É.cµÐî„B ì¥±Au-½•¼×wr‹{kv—Ï3ŽkG™(5ïj_[÷nZû7t\Éñnt8ŒSm]ÀÎAÓW?ˆ'ᦊÞ̳óÙ3Ûâttœ8:áíà<¸ô4ëêG%o¼q8n$½”:ò8ÈÞ×Í?—Iyyñ'udá²îþçíl–S'mü6Z×[û&|ÅîêçtÒÐZñVd÷´ð7Áäœ_%£î-Û&1…‚B_û‰Ÿ›Ø\tŸ5mµïîpùþãÂÜdàñ×?˜‚ÖòØ0Ègzz$k[¦ƒ€Ô‚”lyl³7qJÛ» fZhaÔ½Þ¡Ì}ê U—º³#ŒÂÉiŒÅ83¹Å¥Ø0Êî±³¨±‡§NZû-t/³-avöÇ)mœ},‚kK{¶84DCŽƒu‘Ü—Y§o\ã¯íâ¸7ƒ¦]mwhöHÞ-wK£‘ ƒçóiº°i ^V EÎý¶æ<–&w‡è’tép׃›Ä`ŽKC}Üw~W¸å—ØVšk@=Á8,·„»àÖ¸jHð Îgbk·»ˆ•Ù,ƒÝœÏLzçÊÎ:ˆwü :ôúù©h¼Rب¶(¶(¶(¶(¶( {“ W{lè#¤ŠFßÅ£‡ÃÐè}B°tö”÷Wxc™µmÖ;ñuÄzCëö¥Âc/‡O•§X¿Tü>ꃄ‘ˆn#“B?É!Óô‡à'ïÈ2élP)lP)lP)lP)lP)lP)lP)lP)lP)lP)lP)lP)lP)lP)lP)lP)lP)lP)lP)lP)lP)lP)lP)lP)lP)lP)lP)lP)lP)lP)lP)lP)lP)lP)lP)lP)lP)lP)lP)lP)lP)lP)lP)lP)lP)lP)lPIÑ@¢EŠ (P( Q@¢EŠ (P( Q@¢EŠ (P( Q@¢EŠ (P( ÅºÇ²å±iͺí§lw–»‚8®Ž6ÒûyÚ#»„+½.ÉÌ'Ì”T (1 zõýŒÄÝÊóñûPdÒ(B/ó–S]:»W /Ê|Ù‘»aûãˆBïEz¼ÛeÁæò÷Œ{-gâï·Þ÷hˉ&Œ6{Wñ¦Ghá¸'àUƒ+–Íg1–öÝ¥Ž0~l2½ÉvÒÈ™<§Yi3ÎB :Ày%=ŸØ6µ–ɶfŒÉe¼Ö™9cùÚ_Ö$ <@ù€<ø¥£»'ýÜìŽ&ÊWEÛv-]^Æâ åÈö pýÏâ?Ú –Þàì KŒ[:²Øˆ¦²½·ý)¢ë1þ°Ô=œêSèÆÃå›Þ]±“¹ˆH;–ÁöyV=¿)ºµsƒ¾SåÅ­:r)ðJ÷˜µ´ÉÙvçg1ö]Ñ‘x3~VWÅ 1IÅΕù5#– qä[°=·˜í,|6ñk—·o[îzƒ­®d•ÜuëùÚî\@áñRÝw¿R{wV œsZä ÉŽhlîÔüãs™ÃrÊ0-sóÝжãaoÛØ‰ÿs“¹}iœßç5ƒP>Ñö§ižéì|•ŸtI‹üërw÷ð>ñ·.Ò7Là×>@5ù‰iÐ|U”o¤ù2=£mlÀ>)ï‚áƒÌñêk´Ü¹O]™Ed( Q@¢EŠ (#Ÿh-ïb¹ŒÅp)\·Èj8Æï³ˆûU0½¢9£˜í©ãü^ÞjWlº‚H]ød ÔÄèx ùj×É  VgË>ž]màtØŸ$P( Q@¢EŠ (P( Q@¢EŠ (P( Q@¢EŠ (P( Q@¢EŠ (P( Q@¢EŠ (P( Q@¢EŠ JGÀE)‘ð)‘ð)‘ð)‘ð)‘ð)‘ð)‘ð)‘ð)‘ð)‘ð)‘ð)‘ð)‘ð)‘ð)‘ð)‘ð`ßXË4F[RØò5ÿ’™à–‡‘äà%¤ù„EOÞ¸ûóuc™|xæ>Q ö:Y@dÓŽAÊØ/T€¢¾ziƒæ4DPr×yÌ„Œ¸1C]Ü™FŸš;g¤Lå$ƒä8üB¢f÷#ˆí‹kLe¼%÷˜¬ ³zç7È5ƒÈsqáÌ©ƒQýCÁ÷Eí”]Ç–k-làÜa`Ź‹¨Å$Äü²qqk´ ~#U©‚{²àt8Õ–Cc+…´W6ïats1³7GÆã ùü´àxy)prÈg;Û&np1öö¯¶|mÎä1×Mqd/âè£2†ÈGŸ@?r È{·‹µùñý³mclfk è<º£ëj˜(_KrxìtñÛ‹ÿÝ}Øž'Ïnðcv‡M‘¸ôVÁõFÖÝÌãs8 袚[‡Ï5£×:¶†êð߀xP~!_#§éåöd~'‰í¹û‡¸òR9·Y«‡Óµ‰„ƒ§Yó$ñ#à R>#à R>#à è¹²mÕ¼¶òj+H.`üô(Ž«4–Ìnbù.Höp$GÌ ån×IlóóÁ¡nñ»ðŸ»D.d°_·ãmz4ò:¶fäsGÜ‚B‘ðJGÀ@¤| GÀ@¤| GÀ@¤| GÀ@¤| GÀ@¤| GÀ@¤| GÀ@¤| GÀ@¤| GÀ@¤| GÀ@¤| GÀ@¤| GÀ@¤| GÀ@¤| GÀ@¤| GÀ@¤| GÀ@¤| GÀ@¤| GÀ@¤| GÀ@¤| GÀ@¤| GÀ@¤| GÀ@¤| GÀA)GÑ@£èGÑ¢D >ˆ}(ú Qô@£èGÑ¢D >ˆ}(ú Qô@£èGÑ¢D >ˆ}(ú Qô@£èGÑ¢D >ˆ}(ú Qô@£èƒÌŸY{6ÿøÀî<}£îm¦ƒ«$èÛû“o£zÜGÀ‚=–üÔHýï$’󗼑ùékXÝM)x”ôµ´ÇW“¸j9§¨6‡{wU¯m[ÛÚ2ærÙR[fé\Dp°~9äÓSÒÁä<ÉàdÑDÃ;;˜°‹Øö’cñsä¼ï[ï–{É_ûÇÆÃ®¥çâ|¶ÑjþÆÊÄ`p±î+´]Üíù‹¹ƒ®&s|úäqø€àvˆ¬¯Ô.ôŽ[{¬Ô7¢PæIm ]qÔ@-÷*åk ™ÈàÜØþÅÀßßYf]˜YßnÿìǧI‡Ptå; V¿ÑÄIßÐãáÇvÿeCƒ¶Œë¼ÝYd•Ä—ÈðÞ—ãÄêxoío©Yý»¾ Ƴ]iYÚçæÒï½6 GÓkYÛÞ÷w·“^ßöÍÓºãÕ±‰âJ^âu ¹ºù-C²ë°±9¬'q÷V&; ŽßåøËÞé/ 'Yg“¯R&ŸØx…¯ia¯{k,ìLš|eäu`ªxKÐö½š¸~‹6ò-Ǹ¥ÇÞâÂ͉is‡çâÖîÏAäã$c©€ÿÄР²YÜYdmÙwauå´Ÿ»ž'‡°ý£P¢µGvæYw”pd?žÇvÌñ2ÖÁ¤‡_æäýÔ#à[=NäV¢.¿ÚŒÇâ.íòù<ç\Ãx|æ’Vèæ‚?E ô´rRÑçØì§›žì‰äéÏö4òßvä§ñIGªF7]¾`?Ü·ûíl¬]ŀſ"-&î&™Ú½2·ƒÛö8Š,}R¢D >ˆ}(ú Qô@£è‚&Xi“Žàm²E;> ™¼Xÿ´jÓö*2îbd%—d"ÔJïý³çìx¨9ÜÚ™ {cÒ¨ÑÐ’Nì:·]µP|´{.í¢¸`陇]ZáÁÍ;ƒÁMD >ˆ}(ú Qô@£èGÑ¢D >ˆ}(ú Qô@£èGÑ¢D >ˆ}(ú Qô@£èGÑ¢D >ˆ}(ú Qô@£èGÑ¢D >ˆ}(ú Qô@£èGÑ¢D >ˆ}(ú QôA'HïìHïìHïìHïìHïìHïìHïìHïìHïìHïìHïìHïìHïìHïìHïìHïìHïìHïìHïìHïìHïìHïìHïìHïìHïìHïìHïìHïìHïìHïìHïìHïìHïìHïìƒî`{ŒuC.Œz›úC0ƒCw/Ó‹nÖ/ïžÒd·7v3Cqg…lBX zói¡×‡’Ü»Â5Îܽý““3–†ÅÙ+³?škž$–Ö¢Èô#¥:ô’Ý[o6ý5Í\Çy^ÿÈÍtþÏjÖÙÆýHgGؾöu­Ã'»´¸Êõ»WËsp÷t¿àHoH:üuOê‹î;¶°˜¦3ocÃN¨ák\FîÓR³ª—¤| GdÑ\÷»¡Œ½ç€y’Py–Kƒšúží\vaÂ÷t¶òd/àxsŸ:(Þƒ¯È­üFàÄYE9Ù¥ÿµÄG=¼1«Íœíq·qçòy‚²!~ŒÝÎÇ´€ŸŸ<ð=¾d|Õ¿c•õØÚ´€²­[ß8Ìf"Ý·xxÝŠîŒÃž6{YM {ÿŸ7OÈYus‹‡’±îÉÂw /µî?ÈæÃغé˜&9Í·º-•åϼkò¹Òž¹ÀèµFݱîœ=ÜÑÚ\JüFIí.þ{¶›@t:uü®þ‰+8¯<}PÈcq}óîßÉ6l¥¹éËÛG¨,’ £‘ëaé:rZ"åô³+kgÜ9ÞØ³¹¯‡Èۮ׫F¼jøõæÐ@;´©èoºGe•)ý)ý)ý)ý)ý)ý)ýtÜÚˆ%‡¨°ÈÒð8´üØPcXHoìÁž>™›Õìj#KÆã_-vÚFZ×[—>ÛFx¸·ôIõ:XßËßÉn~V^ƒ,<ãfãÛCî‚B‘ßÙ‘ßÙ‘ßÙ‘ßÙ‘ßÙ‘ßÙ‘ßÙ‘ßÙ‘ßÙ‘ßÙ‘ßÙ‘ßÙ‘ßÙ‘ßÙ‘ßÙ‘ßÙ‘ßÙ‘ßÙ‘ßÙ‘ßÙ‘ßÙ‘ßÙ‘ßÙ‘ßÙ‘ßÙ‘ßÙ‘ßÙ‘ßÙ‘ßÙ‘ßÙ‘ßÙ‘ßÙ‘ßÙ‘ßÙ‘ßÙ‘ßÙ‘ßÙ‘ßÙ‘ßÙ‘ßÙ‘ßÙ‘ßÙ‘ßÙ‘ßÙ‘ßÙCy t7’Cy t7’Cy t7’Cy t7’Cy t7’Cy t7’Cy t7’Cy t7’Cy t7’Cy t7’Cy t7’Cy t7’Cy t7’Cy t7’Cy t7’Cy t7’Cy t7’Cy ·dvò:Ó«ƒº¤·iÊ, 6Áz]{o«5–õy¨Ðí8;#N oÓ<¬³—ïLæ>kØ!½Kscž:‹%ƒö$ÄåÅ[òÇ÷oe ’æÃ-ÄP‡ºqP5ñˆÿ[£›§ÇP³•^v¹î g}wUåÖC$ÌWkض”³Í->« àLlë×ráóiÄ0h·™¶âï²0Çkؽ³6VšÖA’œ{Ñ ésÀ{ÀA­YÏÈë¼ì¼†~KßÀ'ÇÆ*K„³o嬨ójù¬ŽÓO=BoàjYþ›Ù÷}¾7Û6ÎÂà­Xïòå¯Ìã4#ç—ç:µ¯ÓFñßšÖUg–Ë`† =b夓øt­=a`ÒhÞxvºoÁ\éÂd`Íâ1¹xc‡% s27-è};'ÐÞH äÐÞH äÐÞH äÐÞH ä‚.G2Ï%w2Ÿ#O@þ“uöAߨþì?õÎö/*(€€€€€€‚7)û«Oï6ßÖò¿ôë¿Ô(3ÐD`évÿ­7õŽJ%ÐÿÙPK’± 5È1ÄÄÄ!pylons/media/img/hatch-yellow.png‰PNG  IHDRÙJ"è+tEXtCreation TimeWed 2 Mar 2005 01:35:41 -0000Ja5tIMEÕ +Ûï_” pHYs ð ðB¬4˜gAMA± üaIDATxÚcø÷â0`b†ÿ “€,ˆ0HÁ ]KXIEND®B`‚PK’± 5h3ƒÖÖpylons/media/img/header.png‰PNG  IHDRMèí™É+tEXtCreation TimeMon 9 May 2005 22:40:47 -0000?„ïtIMEÕ+½òðŒ pHYs ð ðB¬4˜gAMA± üa.IDATxÚc bb``À‰ÿÿÿ‚‘Åþýû‡“ ã#Ó Ó/$$Ä0±!„÷Í@jˆúÙéIEND®B`‚PK’± 5€?AÄÄpylons/media/img/highlight.png‰PNG  IHDRÙJ"è+tEXtCreation TimeSat 5 Feb 2005 02:45:25 -0000LCCtIMEÕ (bÒÐ pHYs ð ðB¬4˜gAMA± üaIDATxÚcø÷â0`b†ÿ “€,ˆ0HÁ ]KXIEND®B`‚PK’± 5tQØt77pylons/media/img/icon-16.png‰PNG  IHDR‘h6,tEXtCreation TimeFri 28 Oct 2005 14:54:36 -0000[ÏðtIMEÕ ¾|­ë pHYs ð ðB¬4˜gAMA± üaŽIDATxÚc` ©©¹wï^CCC¢TWWWÿþýÿÿÿÇŽ#¬hð$E@ƒ““Äx8wîQN‚¨^ºt©€€QÞØºu+aÇÐ0¢ñ“““1 )) Œœœœ}ûö0¨JŠŠŠ˜ ˜Ðøƒ]ÇHóÜIDyàJ±Èô×Y¹äâÌžIEND®B`‚PK’± 5Hò-%%pylons/media/img/logo.gifGIF89a 4÷990 ÆÆÅLLIeebzzJ{{z~~|‰‰NooErrH——•€€~ƒƒåå墢 333rrq™™™,,(ÌÌÌHHE??>``>fff]]A¾¾½PP:{{J²²°ttržžWÔÔÔ¨¨Zºº`ŒŒQ¤¤Wnnm¥¥X"" ªªªvvGMM7••T==<âââ’’Q‚‚´´´PPNŠŠ‰»»ºiiAkkiŠŠˆEEC°°®bb?ÖÖÖTTQBB6))&ppn[[>II9NNKeeB**'$$"®®[VV?ÿfÌEE:””R//,®®­;;1‚‚M¦¦¥¥¥¥°°\00/``]GGDXX>9??;772@@;==922/..*¦¦YƒƒNòòò00-~~I;;6??:ððð//+~~J::5¦¦X§§Y¹¹_ááḸ_994ÒÒÒ44/ÂÂc885>>:œœUñññÂÂÂÄÄç§ZÓÓÓK¸¸^€€KJ‚‚NƒƒO››TwwHZZ=ääã33.ÖÖÕ::7ÙÙØ““RááàÈÈǬ¬«llkññð[[?òòñWW@ŸŸWXX@ÓÓÒ¥¥£¶¶µ””“ššS@@5yyx11,›ââá¼¼»‰‰ˆWW;ÃÃb¯¯[··¶ØØ×ÒÒѨ¨§ŸŸž22-AA>!ùK, 4þ—H° Áƒ.9`Á„ NJœH±¢Å‹3jL¸€!*ölI²¤É“;:ÔëÊ—0cʬ¨²V//3sêÜi²f¯ <ƒ ŠÐ'P¢H“ê4ª´©Ó“LŸJj1*Õ« pÇ¢Õx´`À‰!‚™4l]t6¡Z²¼Z˜é±„þX„Èà­f¼‚%çÑÇ‚Rm fcÁã' ß.ðÅj‚Ç-|òÈ™±½FØLH›¤¾pB)‚eBŠ$ˆ$8tg6Ž =°1¡3{ÆØæl,Öî‚ †w¾vš2Á×VÜîL‹Fë%xx‡dÂ1­þ‰¨àÚcìÙt^¥HQgc“ñ^â›Â2ÎÔ¹â¼âHâ%êqæŠ"ûq¶L#Ç9÷g”á€ÔÀÙdx· œU°Ç|qඈôÚyi àäÐËày$@‰ùÆÙ-¤Ø‹œí! oé6ƒ6FÐ"!ýýwÕ‚„àà€*q pÆÅ}-B‹G(Aép¦‚  ,1¢láåJ9 qDÌ¥GT€šŒI.‰›Gã‘Z Ô¢"KÊÁfPzd€ ”8'&g]8 B»E€'ÌxD ˜ØAàÑ Ýà pÚ˜œ¤ÇÙ ½!vpbƒGþ«tJŸ¥/Àñè&¡E )!5 ÑV­Ñ"¹NZ‡iZHÙkÊ8ÀŽEpga·rÂáÀ&i‹¶‹Â&A©Ünê€ ŠögWXë[p qÝ@*Ý@¢³Bƒ ÊŠV d”²-U¯’Ã#âƒGiøº"z†¨\r¿‘*i nhÐ&³AF_¾}#¸Ïytˆ’¤¯Á&Ä*nl-JÔ¦®å¢Âo–*o#ÚÒòÇ,óË3 o ”tÎXj†Û<ÐÕÀÙ¸aëÑ(/ñGÚŒ‹´yJ/a¢GP|PÁDäþÕýf wΗ@ÃÙšDеÍ`§f±µ,,±ÝKVEÕ7Ç]pÖ$6!¤HÐòÞ”ý·hvƃ5{-:l¶”‚Pœ©ð˜è´ÔK¼é ³ûͺëKà:Bs’C© £SÜÃcR 0Ü fD€‰êIGtÐ$œÑ0oªyt…$“¨m¨Òåû®ˆ-eïg9ˆº‘•k!dLËtÈAú ‚›ý Ò=2ð¦q¡À÷"ç ¨`)c]ûø>ÀA~¡ýÜ7Ãí  À*ÞsŒÿ)jD"À×Ab·À%@"k„XÅÐ+Þq…‰j‘+l¡Bƒ¼IþÇ›š Š±<ؤР˜xE)‚ ‚ tƒA™[–ÊD¦ƒφé’ø$!…z\Y˜Š'ZMe½pè¶´:1"3Ûƒ¤ãA,ŒR\ "qœ„7¼8‚aÜc8³ƒ=àÑ ÝšÂ×XD7*dØCÄÅ#yÄ"ØBº5 ô°0\…jx„ë%Ò;ˆ Z‰Ò4cˆS£Ã+*)‚¾!d*ƒç”…ˆ8ƒƒI‹„KÑŠ3êÑ;­X!r„®Õ3›f.wiÍ•YhiH&ªYDt3€q "Ј‚t‹þ0`A ñ2ΔAlô9R<8!™A†Ê0W¾½½³œ½”›XlàD¡„H‡8óèZ”!ügÚ& „6b!ZøJÑøFžô$ˆH=R„,¢žXÁ"Z4Œ„]B,±ÏÞ†°•!øšÇ•q¢0Ç-ñM¤‰EB´9SÒ‰G6*Q`bfà‚5Á\ÀÁdn´ä в ˜ÈîvçÓˆW!¼RX.šÁÞô·¸Ø$ ÁÄ@jD"rÒüóp«]„|þ»„D@ƒ^€ÖDÀiD$üaƒDxÂqÄ$6‘á #a\1âT€¾8Žˆ –‚%òK…j´I„ˆ%E,HÈ8&B6\Žÿçˆ{ oäĈHó [,BºªË2E \‘\AxibÅ]-›!x#fþA¸1R`ÀgG>³œq«f‚Ð)†Q+1ç>„VàÃʬ)艇0€àH>'D$À. À„JHÄ&…¥—@ˆ‚ÏÒð€(<@%TžÐô@¦QêJ8Z Æ… Üðé‹`ZÕ1™F4\mDD@{ØDœ‰ @¶Ànª ‰£¾@@$:‹G(D ˜„“ !msºèD!„1‰qGÀÉK°C!žQm‚<Û1(DaíŠÜè~ɽémM<"ÇHD³)’ˆI ‚fˆ…À'â‰B8a¾("”`x‚ V@ìð hèt!þBˆÿ"›€E!0ŒB`!¿F¡nSÌB _Bî‡BtÀÀy"‚Ns0!Ò0‹l".ÆÒM€j â$ø… 6î  !Lp ¾žñüB‘ˆD &Qo§4<¼€E ¡* MˆB!PŠB! B!´0‹‘¿bÁh(D ‡° ‹àE Œ‹l »ˆC! Kè¼­iÄÈÅ0ùÊ»ÁïQ(A6"…d°©H!R‘ À©(„ë__Xè"+§B$0Aiõ…˜Eá…ÁŠ]„âÜRiø ÒD@¾`E LþQˆR@¡,èD C~ÁLy$2°rÙ ¡PÅ,ZJ$!°tÃÑ K¨_ñ7 xP=Ð ðxo ~YPÃ`~z ~¥Ð>7rN)@ Ü·x³ àÇ ‡…)pÚ²inW’Ðs- T 1  'à …` Hƒ6ø| & %P'˜Gr…¡` zÐràn)PrŸwSê&‚3ˆ„á†È}¡p„Y ~"ør7ˆ‹ð .7r† ~  …Œw„X  … b` —‚‹°z1 †F2èP ˆØ—g ù'þÒP`À— Á@ ÉÀC@€ÙPà„ ‡nPª°³‰“ˆ Pá@ P-€¨€±Çˆz xy‥ø}Ï— ¨€z·‘ÀP€ †py¬Ø„Xö g­‘€T  ªÀ ˆyÓf¨0w}—vÏ·iP7¹ç˜ ‘0 †Ó¨ Ypˆ W‘ P}pެÐ0…€ ÐÕi÷q±‡ É€¨pŽ…  ægˆºÈ‹7ªÐŠhXŒ.×sI ž÷š€I‰ð†3 €ç†NEf8ÐP° ›0 ·‘Ö·þZˆàš cv“ð²°É’Äò`“ÄB““ð}€ÿó†ãD “±Y@,±ÀdO‰I@UIO˜ä"6 D€.)£À0 gÉšP §Ðd½øa` ŒÀ–à–§Œ0 q þ¦ ²”² –§P –p—Žà•0˜Kp–‰ z9 „i˜ˆy –ð{9 ð–vY—²ÀŽp L× †0 Ž`—šI—Ÿ9—¢é®9—™© Œ i|©(™p —°–G•p ™€ºiºœ‘›Æ©Åy¹¹›ÂI™Œ€ ˜ðÀ©Í™œÂ‰^s–iég±–·y;PK’± 5,ˆ’ÍÍ#pylons/media/img/main-nav-bg-on.png‰PNG  IHDRUh?,tEXtCreation TimeFri 21 Oct 2005 03:03:42 -0000_2޲tIMEÕ \i]µ pHYs ð ðB¬4˜gAMA± üa$IDATxÚcdbFFF&2iBÓÒllv c\â4Ð|÷4/ËIEND®B`‚PK’± 5Aù¸ôô pylons/media/img/main-nav-bg.png‰PNG  IHDRUh?,tEXtCreation TimeFri 21 Oct 2005 03:03:42 -0000_2޲tIMEÕ 4/Ì—Ž pHYs ð ðB¬4˜gAMA± üaKIDATxÚcøqT‰‰2üŸ‰“éÿÿÿ` âÃiÂüÿÿAf@iùĘÏðŸ.ÆÿÍø!Ñ‹)†ðHU fßµÇ ßPŽÇ‚fTIEND®B`‚PK’± 5#>ÀÈiipylons/media/img/plus.jpgÿØÿàJFIFÿÛC    $.' ",#(7),01444'9=82<.342ÿÛC  2!!22222222222222222222222222222222222222222222222222ÿÀ "ÿÄÿÄ#"#4Ts’±ÿÄÿÄ!ÿÚ ?g®n½Ieº=%êiÈ‘>󧼎ìn.±¥ÜÄs±¥ÕU1Œ}\ÏpïºÅ7Ö?ä/°¢Zš2öžÐY?ÿÙPK’± 5Â×öCpylons/media/img/tab-brown.png‰PNG  IHDR,^‚¾\,tEXtCreation TimeThu 20 Oct 2005 13:22:14 -0000 9ÛÚtIMEÖ=b‚+ pHYs ð ðB¬4˜gAMA± üa[IDATxÚíÜA Â@@Q «€8á HÂV€ A¥.þaß;ô<—ŸÙ4Ûno÷óèŒËõXÏóz>ÞãõùÖcÀ¤N‡ýúÜÕcÀìD1BL„!ÄD1BL„!ÄD1BL„!ÄD1BL„!ÄD1BL„˲Ô3ÀÔ†¡56*„”M1›b^Ì@lÝ„õ07›b"„˜ã(ÄlBˆ‰bŽ£³ !&Bˆ¹¶±±üD%_Q@ÌqbC‚Ðò£'ˆ‰b"„˜!&Bˆ‰b"„˜!&Bˆ‰b"„˜!&Bˆ‰b"„˜!&Bˆ‰b"„˜!&Bˆ‰b"„˜!&Bˆ‰b"„˜!&Bˆ‰b"„˜!&Bˆ‰b"„˜!&Bˆ‰b"„˜!&Bˆ‰b"„˜!&Bˆ‰b"„˜!&Bˆ‰b"„ØK4æ}ÍMsIEND®B`‚PK’± 5ǘŸååpylons/media/img/tab-white.png‰PNG  IHDR,^‚¾\,tEXtCreation TimeThu 20 Oct 2005 13:22:14 -0000 9ÛÚtIMEÖ':æ%— pHYs ð ðB¬4˜gAMA± üaÙ9,tEXtCreation TimeThu 20 Oct 2005 13:22:14 -0000 9ÛÚtIMEÕ 6¸¤£ pHYs ð ðB¬4˜gAMA± üaPLTE¥B­9­B­J­R­RµRµZµZ½Z½Z½c½c½c½k½k!ÆcÆkÆsÆsÎJÎ{Ö{քքք֌ބބJÞœç”ç”çœç¥ï¥ï¥ï­!ïµ!÷¥÷­÷µ÷½!÷Æ!ÿ¥ÿ­ÿµÿ½ÿÆ!ÿÎ!ÿÎ)ÿÖcÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ)² ßtRNSÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿY†çjAIDATxÚíØÝJBQ@á¹÷.§ÄLËü©#Väû?\ ‚&›sf]‰°¾'ðّjziˆƒZÚ±~Õ²IcÕMÓXe±€y«lg,`ƪ{Lc•uÆ®o¼±zìŒ\ÝxcõúããG=><§±Ê:cË‹Zñ­~ã4VÙ‡±€ó7 ±Ÿñ¥!¯i¬º±±êV§Õн†=¥±Ê¶§X[ÌŽµâ]£4VÙâëM%i¬²…±€I«n’qëcÆŒ 0`,ÀX€±cÆŒ 0`,ÀX€±cÆŒ 0`,ÀX€±cÆŒ 0`,ÀX€±cÆŒ 0`,ÀX€±cÆŒ 0`,ÀX€±cÆŒ 0`,ÀX€±c!qëîɰ³wg»Ë(rIEND®B`‚PK’± 5^Й7CCpylons/media/img/tab-yellow.png‰PNG  IHDR,^‚¾\,tEXtCreation TimeThu 20 Oct 2005 13:22:14 -0000 9ÛÚtIMEÖ*va;¨ pHYs ð ðB¬4˜gAMA± üašIDATxÚíÙ1NÃ0€ÑåÜ…ëp $$f§èÔ‰†V¼ú«”÷†Î¿*qb//÷' ³|^^ëพÞÖ÷Ës=Ôùëcÿ½«Ç€£!ÄD1BL„!ÄD1BL„!ÄD1BL„!ÄD1BL„!ÄD1Blݶk=‡°,žøÿ!ÄÖí*B¦°Ø ™ÅBXO"dŠ­àfÙ ™d©¸Y"„˜¡óûz BèüEè`†9ÌŒØ ™ÄÁ̈ËzfqY?`'d m@„!ÄöoÂïzŽÁ7á€Y,´BÌe=“¸¬ÙwB3,ÞGÖzŽÂã~ĉÄD1BL„!ÄD1BL„!ÄD1BL„!ÄD1BL„!ÄD1BL„!ÄD1BL„!ÄD1BL„!ÄD1BL„!ÄD1BL„!ÄD1BL„!ÄD1BL„!ÄD1BL„!ÄD±ª•ND¯à€IEND®B`‚PK’± 5SÃúOpylons/media/img/warning.gifGIF89a÷!!ZZsk{s„{Œ„œœ¥œ½­½µÆµÆÆÎ½ÖÎÞ½BÞ½JÞ½RÞ½ZÞÆJÞÆZÞÆcÞÆkç½BçÆBçÆJçÎJçÎRçÎkçÎsçÎ{çÎŒçÖJçÖ{çÖŒçÖ”çÞçÞ¥çÞ­ïÎJïÖJïÖRïÖ”ïÞ”ïÞœïÞ¥ïç­ïï½ïïÆ÷ÖJ÷ÞJ÷ÞR÷ç÷çJ÷ïÆ÷÷Æ÷÷ÎÿÞÿçÿçÿç1ÿçJÿïÿïÿï!ÿï1ÿïBÿ÷ÿ÷ÿ÷ÿ÷)ÿ÷1ÿ÷9ÿ÷Bÿ÷Jÿ÷Îÿ÷Öÿ÷Þÿÿÿÿÿÿÿÿ!ÿÿÖÿÿÞÿÿçÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ,å­H° A**\¸° ‡JŒè!B'bXDH!‰ &JÜx# 'ryÁFœŒÜhbC"@BXY1b Iˆù!„BŽEØ0Ò À )>ˆ ƒÂ"øB ™ «4™0¤ðàac‚ÌžTH„0"´„€?vÑRaÉ ?ŠÔPPcÇC$ä¨è¤åÇ5HpX šÐ  @p°–‡Ž¾6‰À!…k×3TÌH¡B† .8ÉÑ‚…oß$F_1B8-¨;PK’± 5Ÿ;“,#,#pylons/media/style/orange.cssbody{ margin: 0px; padding: 0px;/* 4% 0 0;*/ background: #494943 url(../img/bg.jpg) top repeat-x; font-family: Verdana, Arial, sans-serif; font-size: 75%; line-height: 160%; color: #333; /*min-width:770px; max-width: 1100px;*/ } /* Layout Styles */ /*.top-bar{background: #fff url(../img/bar.png) right top no-repeat;} */ div.main-content-bg{ } div.main-content-bar{ } div#nav-bar{ border-top: 1px solid #fff; float: left; width: 100%; margin-top: 16px; background: #fff url(../img/bar-bg.png) right top repeat-x; } div#main-content{ float: left; width: 100%; background: #fff; } div#side-content{ /*background: #FFf url(../img/bar.png) top right no-repeat;*/ padding-top: 42px; float: left; margin-top: 0px; width: 30%; clear: right; height: 550px; } div.three, div.two, div.one{ width: 746px; padding: 0 12px 0px 12px; clear: both; } div.three div.a, div.two div.a{ float: left; clear: left; width: 204px; /*background-color: #ddd;*/ } div.a div.padding, div.b div.padding, div.c div.padding, div.one div.padding{ padding: 0px 12px 20px 12px; } div.three div.b{ float: left; width: 271px; /*background-color: #ccc;*/ } div.three div.c{ float: left; clear: right; width: 271px; /*background-color: #bbb;*/ } div.two div.b{ float: left; clear: right; width: 542px; /* background-color: #333;*/ } /* Logo */ h1#logo{ margin: 20px 5% 0 5%; padding: 0; float: left; width: 155px; height: 52px; /*padding: 25px 5% 0 5%; margin: 0 0 0 -2px; float: left;*/ } /* Nav Bar */ #nav-global { margin:0; white-space:nowrap; float: right; /*position: absolute; margin:0; left:380px; top: 0px;*/ padding-right: 5%; clear: right; padding-bottom: 20px; } #nav-global li { display:block; float:left; list-style-type:none; margin:0; padding:0; } #nav-global a { display:block; float:left; /*font-family:"Trebuchet MS"; font-size: 110%; */ padding:42px 18px 7px 18px; background:#000000; color: #ccc; border: 0px; text-decoration: underline; } #nav-global a:hover { color:white; background: url(../img/main-nav-bg-on.png) bottom repeat-x; border: 0px; } #homepage #nav-homepage a, #overview #nav-overview a, #download #nav-download a, #documentation #nav-documentation a, #weblog #nav-weblog a, #community #nav-community a, #code #nav-code a { color:white; background:#000 url(../img/main-nav-bg.png) bottom repeat-x; } ul#navlist { /*background: url(../img/bar.png) left top no-repeat;*/ margin: 0; padding:0; padding-left: 5%; padding-top: 8px; color: #eee; line-height: 34px; } ul#navlist li { display: inline; } ul#navlist li a { /*font-family: Tahoma, sans-serif; font-size: 11px;font-weight: bold;*/ border: 0px; border-left: 1px solid #49A200; /*padding: 0em 1em;*/ padding: 0 18px 0 18px; color: #fff; margin-right: 9px; text-decoration: none; float: left; background: url('../img/tab-brown.png') no-repeat top right; } ul#navlist li a#highlight , ul#navlist li a#highlight:hover { background: url('../img/tab-yellow-highlight.png') no-repeat top right; color: #fff; padding-right: 33px; } ul#navlist li a:hover { background: url('../img/tab-yellow.png') no-repeat top right; color: #fff; } ul#navlist li.active a.active, ul#main-nav li.active a.active:hover { background: url('../img/tab-white.png') no-repeat top left; color: #333; } /* Font Styles */ a, a:link, a:visited, a:active { color: #0040BB; text-decoration: none; border-bottom: 1px dotted #ccc; } a:hover{ color: #000; border-bottom: 1px dotted #000; } a.no-underline, a.no-underline:link, a.no-underline:visited, a.no-underline:active { border: 0px; } img.no-border{ border: 0px; } /* Paragraph Styles */ .last{ padding-bottom: 0px; margin-bottom: 0px; } .first{ margin-top: 0px; } blockquote { padding-left: 10px; padding-right: 10px; margin-left: 5px; margin-right: 0; border-left: #ddd; border-width: 0 0 0 1px; border-style: none none none solid; } p.first, form{ padding: 0px; margin: 0px; } .medium{ font-family: Verdana, Geneva, Arial, sans-serif; font-size: 11px; line-height: 19px; } .large{ font-size: 110%; } .small{ font-size: 90%; line-height: 150%; font-family: Verdana, sans-serif; color: #000; } p.indent{ padding-left: 15px; padding-bottom: 15px; } tt, code{ font-size: 130%; color: #800000; } pre{ /* border-top: 1px dotted #000; border-left: 1px dotted #000; border-right: 1px solid #999; border-bottom: 1px solid #999; background: #eee;*/ font-size: 120%; padding: 3px 5px 3px 10px; margin-right: 10px; } .go{ background: url(../img/go.png) no-repeat right bottom; padding-right: 20px; } .help, a.help{ cursor: help; font-weight: normal; } .highlight{ background: #ffffcc url(../img/highlight.png) repeat; } /* Horizontal Rule */ div.hr { clear: both; line-height: 0px; font-size: 0px; margin: 0px; padding: 0px; /*height: 4px; url(../img/horizontal-rule.png) no-repeat;background: #000; margin-bottom: 20px; width: 770px;*/ } hr { height: 1em; visibility: hidden; margin: 0px; padding: 0px; } /* Form Styles */ .form-style input[type=submit]{ background: #87CD15; color: #fff; border-top: 1px solid #999; border-left: 1px solid #999; border-bottom: 1px solid #333; border-right: 1px solid #333; } .form-style input[type=text], textarea, input[type=file]{ font-family: Tahoma, sans-serif; font-size: 11px; color: #444; background: #EAFEC2; border: solid 1px #aaa; padding: 3px; } .form-style select{ font-family: Tahoma, sans-serif; font-size: 11px; color: #444; background: #EAFEC2; border: solid 1px #aaa; } /* Lists */ ul.large{ padding: 0 0 0 15px; margin: 0 0 15px 0px; } ul.large li a { font-weight: normal; } /* Header Styles */ h1.first{ margin-top: 0px; border-bottom: 1px solid #666; background: #fFF; padding: 3px; } h1, h2, h3 { font-size: 170%; line-height: normal; font-weight: normal; font-family: Arial, sans-serif; color: #000000; text-decoration: none; /*margin: 0 0 12px 0; padding: 0;*/ text-align: left; } h2{ font-size: 140%; } h3 { font-size: 120%; } h4{ font-size: 100%; } h4.asterix{ background: url(../img/box-small.png) no-repeat left center; padding: 0px 0px 0px 15px; margin: 0px; /*font-size: 110%; */ color: #000000; } /* Boxes */ div.faq-box{ /*border-style: solid; border-color: #C6F27A; border-width: 1px;*/ background:url('../img/hatch-green.png'); padding: 10px; /*font-family: Verdana, Geneva, Arial, sans-serif; font-size: 11px; line-height: 17px;*/ } div.highlight-box{ border-style: solid; border-color: #cccccc; border-width: 1px; background:url('../img/hatch-yellow.png'); padding: 10px; color: #555; /*font-family: Verdana, Geneva, Arial, sans-serif; font-size: 11px; line-height: 17px;*/ } .box-top{ width: 518px; background: url(../img/box-top.png) no-repeat left top; padding-top: 7px; margin-bottom: 15px; } .box-middle{ background: url(../img/box-middle.png) repeat-y left top; } .box-bottom{ background: url(../img/box-bottom.png) no-repeat left bottom; padding: 0 10px 11px 12px; } /* Utility Styles */ .content-padding{ padding: 20px 6.5% 40px 6.5%; } .sidebar-padding{ padding: 15px 15px 40px 25px; } .invisible{ visibility: hidden; font-size: 1px; padding: 0px; line-height: 0px; margin: 0px; } a.no-underline{ border: 0px; } img.no-border{ border: 0px; } br.clear{ clear: both; width: 100%; } /* Quotes */ .quote-top p{ padding: 0px; margin: 0px; } .quote-top{ font-family: tahoma; /*background: url(../img/quote-top.png) no-repeat left top;*/ padding-left: 25px; padding-top: 4px; } .quote-bottom{ /*background: url(../img/quote-bottom.png) no-repeat right bottom;*/ padding-right: 17px; padding-bottom: 7px; } .quote-author{ background: url(../img/quote-author.png) no-repeat left top; padding-left: 20px; padding-bottom: 20px; } /* Footer Styles */ #footer{padding: 5px 5% 40px 5%;} #footer p{ color: #333; } #footer a{ font-weight: normal; } #footer a:visited{ color: #666; text-decoration: none; border-bottom: 1px dotted; } #footer a{ color: #888; font-weight: normal; } #footer a:hover{ color: #000; text-decoration: none; border-bottom: 1px dotted; } PK“± 5pylons/templates/__init__.pyPKÇ«'5d¶¨™™pylons/templates/__init__.pyc;ò FcÝDc@sdS(N((((sIbuild/bdist.darwin-8.7.0-Power_Macintosh/egg/pylons/templates/__init__.pys?sPK“± 5Ï_¦–‚‚#pylons/templates/controller.py_tmplfrom ${base_package}.lib.base import * class ${name}Controller(BaseController): def index(self): return Response('') PK“± 5Ç ¬"ÆÆ(pylons/templates/test_controller.py_tmplfrom ${base_package}.tests import * class Test${name}Controller(TestController): def test_index(self): response = self.app.get(url_for(controller='${fname}')) # Test response...PK¬¢'5²´n  5pylons/templates/paster_template/development.ini_tmpl# # ${project} - Pylons development environment configuration # # The %(here)s variable will be replaced with the parent directory of this file # [DEFAULT] debug = true email_to = you@yourdomain.com smtp_server = localhost error_email_from = paste@localhost [server:main] use = egg:Paste#http host = 0.0.0.0 port = 5000 [app:main] use = egg:${project} cache_dir = %(here)s/data session_key = ${package} session_secret = somesecret # If you'd like to fine-tune the individual locations of the cache data dirs # for Myghty, the Cache data, or the Session saves, un-comment the desired # settings here: #myghty_data_dir = %(here)s/data/templates #cache_data_dir = %(here)s/data/cache #session_data_dir = %(here)s/data/sessions # Specify the database for SQLObject to use via pylons.database.PackageHub. # %(here) may include a ':' character on Windows environments; this can # invalidate the URI when specifying a SQLite db via path name. Refer to the # SQLObject documentation for a special syntax to preserve the URI. #sqlobject.dburi = sqlite:%(here)s/somedb.db # WARNING: *THE LINE BELOW MUST BE UNCOMMENTED ON A PRODUCTION ENVIRONMENT* # Debug mode will enable the interactive debugging tool, allowing ANYONE to # execute malicious code after an exception is raised. #set debug = false PK“± 51é ××0pylons/templates/paster_template/README.txt_tmplThis file is for you to describe the ${project} application. Typically you would include information such as the information below: Installation and Setup ====================== Install ``${project}`` using easy_install:: easy_install ${project} Make a config file as follows:: paster make-config ${project} config.ini Tweak the config file as appropriate and then setup the applicaiton:: paster setup-app config.ini Then you are ready to go. PK“± 5LêãEÝÝ/pylons/templates/paster_template/setup.cfg_tmpl[egg_info] tag_build = dev tag_svn_revision = true [easy_install] find_links = http://www.pylonshq.com/download/ [pudge] theme = pythonpaste.org # Add extra doc files here with spaces between them docs = ${package}/docs/index.txt # Doc Settings doc_base = ${package}/docs/ dest = ${package}/docs/html # Add extra modules here separated with commas modules = ${package} title = ${package.capitalize()} organization = Pylons # Optionally add extra links #organization_url = http://pylons.groovie.org/ #trac_url=http://pylons.groovie.org/ settings = no_about=true # Optionally add extra settings # link1=/community/ Community # link2=/download/ Download [publish] doc-dir=${package}/docs/html make-dirs=1 PKj«'5£d`x.pylons/templates/paster_template/setup.py_tmplfrom setuptools import setup, find_packages setup( name=${repr(project)|empty}, version=${repr(version)|empty}, #description="", #author="", #author_email="", #url="", install_requires=["Pylons>=0.9.2"], packages=find_packages(), include_package_data=True, test_suite = 'nose.collector', package_data={'${package}': ['i18n/*/LC_MESSAGES/*.mo']}, entry_points=""" [paste.app_factory] main=${package}:make_app [paste.app_install] main=paste.script.appinstall:Installer """, )PK¬¢'5-د++Qpylons/templates/paster_template/+egg+.egg-info/paste_deploy_config.ini_tmpl_tmpl# # ${project} - Pylons configuration # # The %(here)s variable will be replaced with the parent directory of this file # [DEFAULT] debug = true email_to = you@yourdomain.com smtp_server = localhost error_email_from = paste@localhost [server:main] use = egg:Paste#http host = 0.0.0.0 port = 5000 [app:main] use = egg:${project} cache_dir = %(here)s/data session_key = ${package} session_secret = $${app_instance_secret} app_instance_uuid = $${app_instance_uuid} # If you'd like to fine-tune the individual locations of the cache data dirs # for Myghty, the Cache data, or the Session saves, un-comment the desired # settings here: #myghty_data_dir = %(here)s/data/templates #cache_data_dir = %(here)s/data/cache #session_data_dir = %(here)s/data/sessions # Specify the database for SQLObject to use via pylons.database.PackageHub. # %(here) may include a ':' character on Windows environments; this can # invalidate the URI when specifying a SQLite db via path name. Refer to the # SQLObject documentation for a special syntax to preserve the URI. #sqlobject.dburi = sqlite:%(here)s/somedb.db # WARNING: *THE LINE BELOW MUST BE UNCOMMENTED ON A PRODUCTION ENVIRONMENT* # Debug mode will enable the interactive debugging tool, allowing ANYONE to # execute malicious code after an exception is raised. set debug = false PK“± 5«¹OZŒŒ;pylons/templates/paster_template/+package+/__init__.py_tmpl""" ${package} This file loads the finished app from ${package}.config.middleware. """ from ${package}.config.middleware import make_app PK“± 51UsD}};pylons/templates/paster_template/+package+/websetup.py_tmpldef setup_config(command, filename, section, vars): """ Place any commands to setup ${package} here. """ passPK“± 5€Œ¥Bpylons/templates/paster_template/+package+/config/__init__.py_tmpl# PK“± 5®R7ÊÊEpylons/templates/paster_template/+package+/config/environment.py_tmplimport os import pylons.config from ${package}.config.routing import make_map def load_environment(): map = make_map() # Setup our paths root_path = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) paths = {'root_path': root_path, 'controllers': os.path.join(root_path, 'controllers'), 'templates': [os.path.join(root_path, path) for path in \ ('components', 'templates')], 'static_files': os.path.join(root_path, 'public') } # The following options are passed directly into Myghty, so all configuration options # available to the Myghty handler are available for your use here myghty = {} myghty['log_errors'] = True # Add your own Myghty config options here, note that all config options will override # any Pylons config options # Return our loaded config object return pylons.config.Config(myghty, map, paths) PK“± 5ÚÂÁDpylons/templates/paster_template/+package+/config/middleware.py_tmplfrom 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 pylons.error import error_template from pylons.middleware import ErrorHandler, ErrorDocuments, StaticJavascripts, error_mapper import pylons.wsgiapp from ${package}.config.environment import load_environment def make_app(global_conf, **app_conf): """Create a WSGI application and return it global_conf is a dict representing the Paste configuration options, the paste.deploy.converters should be used when parsing Paste config options to ensure they're treated properly. """ # Load our Pylons configuration defaults config = load_environment() config.init_app(global_conf, app_conf, package='${package}') # Load our default Pylons WSGI app and make g available app = pylons.wsgiapp.PylonsApp(config) g = app.globals app = ConfigMiddleware(app, {'app_conf':app_conf, 'global_conf':global_conf}) # YOUR MIDDLEWARE # Put your own middleware here, so that any problems are caught by the error # handling middleware underneath # @@@ Change HTTPExceptions to HTTP responses @@@ app = httpexceptions.make_middleware(app, global_conf) # @@@ Error Handling @@@ app = ErrorHandler(app, global_conf, error_template=error_template, **config.errorware) # @@@ Static Files in public directory @@@ static_app = StaticURLParser(config.paths['static_files']) # @@@ WebHelper's static javascript files @@@ javascripts_app = StaticJavascripts() # @@@ Cascade @@@ app = Cascade([static_app, javascripts_app, app]) # @@@ Display error documents for 401, 403, 404 status codes (if debug is disabled also # intercepts 500) @@@ app = ErrorDocuments(app, global_conf, mapper=error_mapper, **app_conf) # @@@ Establish the Registry for this application @@@ app = RegistryManager(app) return app PK»5¢Eê˜aaApylons/templates/paster_template/+package+/config/routing.py_tmpl""" Setup your Routes options here """ import sys, os from routes import Mapper def make_map(): root_path = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) map = Mapper(directory=os.path.join(root_path, 'controllers')) # This route handles displaying the error page and graphics used in the 404/500 # error pages. It should likely stay at the top to ensure that the error page is # displayed properly. map.connect('error/:action/:id', controller='error') # Define your routes. The more specific and detailed routes should be defined first, # so they may take precedent over the more generic routes. For more information, refer # to the routes manual @ http://routes.groovie.org/docs/ map.connect(':controller/:action/:id') map.connect('*url', controller='template', action='view') return map PK“± 5Gpylons/templates/paster_template/+package+/controllers/__init__.py_tmplPK“± 5|DzGttDpylons/templates/paster_template/+package+/controllers/error.py_tmplimport os.path from paste import fileapp from pylons.middleware import media_path, error_document_template from pylons.util import get_prefix from ${package}.lib.base import * class ErrorController(BaseController): """ Class to generate error documents as and when they are required. This behaviour of this class can be altered by changing the parameters to the ErrorDocuments middleware in your config/middleware.py file. """ def document(self): """ Change this method to change how error documents are displayed """ page = error_document_template % { 'prefix': get_prefix(request.environ), 'code': request.params.get('code', ''), 'message': request.params.get('message', ''), } return Response(page) def img(self, id): return self._serve_file(os.path.join(media_path, 'img', id)) def style(self, id): return self._serve_file(os.path.join(media_path, 'style', id)) def _serve_file(self, path): fapp = fileapp.FileApp(path) return fapp(request.environ, self.start_response) PK«¢'5½BGpylons/templates/paster_template/+package+/controllers/template.py_tmplfrom ${package}.lib.base import * class TemplateController(BaseController): def view(self, url): """ This is the last place which is tried during a request to try to find a file to serve. It could be used for example to display a template:: def view(self, url): return render_response(url) Or, if you're using Myghty and would like to catch the component not found error which will occur when the template doesn't exist; you can use the following version which will provide a 404 if the template doesn't exist:: import myghty.exception def view(self, url): try: return render_response('/'+url) except myghty.exception.ComponentNotFound: return Response(code=404) The default is just to abort the request with a 404 File not found status message. """ abort(404) PK“± 5cOÉjAA>pylons/templates/paster_template/+package+/docs/index.txt_tmpl${package} ${len(package)*'+'} This is the main index page of your documentation. It should be written in reStructuredText format. You can generate your documentation in HTML format by running this command:: setup.py pudge For this to work you will need to download and install ``buildutils`` and ``pudge``. PK“± 5@pylons/templates/paster_template/+package+/i18n/__init__.py_tmplPK“± 5?pylons/templates/paster_template/+package+/lib/__init__.py_tmplPK“± 5qv½)’’Bpylons/templates/paster_template/+package+/lib/app_globals.py_tmplclass Globals(object): def __init__(self, global_conf, app_conf, **extra): """ You can put any objects which need to be initialised only once here as class attributes and they will be available as globals everywhere in your application and will be intialised only once, not on every request. ``global_conf`` The same as variable used throughout ``config/middleware.py`` namely, the variables from the ``[DEFAULT]`` section of the configuration file. ``app_conf`` The same as the ``kw`` dictionary used throughout ``config/middleware.py`` namely, the variables the section in the config file for your application. ``extra`` The configuration returned from ``load_config`` in ``config/middleware.py`` which may be of use in the setup of your global variables. """ pass def __del__(self): """ Put any cleanup code to be run when the application finally exits here. """ pass PK‹­"59 ««;pylons/templates/paster_template/+package+/lib/base.py_tmplfrom pylons import Response, c, g, cache, request, session from pylons.controllers import WSGIController from pylons.decorators import jsonify, rest, validate from pylons.templating import render, render_response from pylons.helpers import abort, redirect_to, etag_cache import ${package}.models as model import ${package}.lib.helpers as h class BaseController(WSGIController): def __call__(self, environ, start_response): # Insert any code to be run per request here. The Routes match # is under environ['pylons.routes_dict'] should you want to check # the action or route vars here return WSGIController.__call__(self, environ, start_response) PK’­"5b^å¶¶>pylons/templates/paster_template/+package+/lib/helpers.py_tmpl""" Helper functions All names available in this module will be available under the Pylons h object. """ from webhelpers import * from pylons.util import _, log, set_lang, get_lang PK“± 54þ[[Bpylons/templates/paster_template/+package+/models/__init__.py_tmpl## NOTE ## If you plan on using SQLObject, the following should be un-commented and provides ## a starting point for setting up your schema #from sqlobject import * #from pylons.database import PackageHub #hub = PackageHub("${package}") #__connection__ = hub # You should then import your SQLObject classes # from myclass import MyDataClass PK“± 5@ú¿Apylons/templates/paster_template/+package+/public/index.html_tmpl Pylons Default Page

Welcome to your Pylons Web Application

Weren't expecting to see this page?

The ${package}/public/ directory is searched for static files before your controllers are run. Remove this file (${package}/public/index.html) and edit the routes in ${package}/config/routing.py like so:

 map.connect('', controller='hello', action='index')

Getting Started

You're now ready to start creating your own web application. Here's what a basic controller looks like to print out 'Hello World' and respond to http://127.0.0.1:5000/hello:

# ${package}/controllers/hello.py
# Note that the line above is the file you should create and put the following into...

from ${package}.lib.base import *

class HelloController(BaseController):
    def index(self):
        return Response('Hello World')
        

Using a template

If you want to call a template and do something a little more complex, here's an example printing out some request information from a Myghty template.

# ${package}/templates/serverinfo.myt

<p>Hi, here's the server environment: <br />
<% str(request.environ) %></p>

<p>
here's the URL you called: <% h.url_for() %>
</p>

<p>
and here's the name you set: <% c.name %>
</p>

Then add this to your hello controller class:
    def serverinfo(self):
        c.name = 'The Black Knight'
        return render_response('/serverinfo.myt')
You can now view the page at: http://127.0.0.1:5000/hello/serverinfo

PK“± 5¯`‡@pylons/templates/paster_template/+package+/templates/autohandler% m.call_next()PK“± 5×µ@ŽÈÈApylons/templates/paster_template/+package+/tests/__init__.py_tmplimport os, sys from unittest import TestCase here_dir = os.path.dirname(__file__) conf_dir = os.path.dirname(os.path.dirname(here_dir)) sys.path.insert(0, conf_dir) import pkg_resources pkg_resources.working_set.add_entry(conf_dir) pkg_resources.require('Paste') pkg_resources.require('PasteScript') from paste.deploy import loadapp import paste.fixture from ${package}.config.routing import * from routes import request_config, url_for class TestController(TestCase): def __init__(self, *args): wsgiapp = loadapp('config:development.ini', relative_to=conf_dir) self.app = paste.fixture.TestApp(wsgiapp) TestCase.__init__(self, *args) __all__ = ['url_for', 'TestController'] PK“± 5Dpylons/templates/paster_template/+package+/tests/test_models.py_tmplPK“± 5Lpylons/templates/paster_template/+package+/tests/functional/__init__.py_tmplPK’± 5€Œ¥tests/__init__.py# PKÇ«'5Hmu-ŽŽtests/__init__.pyc;ò EcÝDc@sdS(N((((s>build/bdist.darwin-8.7.0-Power_Macintosh/egg/tests/__init__.pys?sPK’± 5¬?@  tests/conftest.pyimport sys import os import shutil import pkg_resources here = os.path.dirname(__file__) base = os.path.dirname(here) sys.path.append(here) sys.path.insert(0, base) here = os.path.dirname(__file__) pkg_resources.working_set.add_entry(base) if not os.environ.get('PASTE_TESTING'): output_dir = os.path.join(here, 'test_webapps', 'output') if os.path.exists(output_dir): shutil.rmtree(output_dir) PKÇ«'5/wËßßtests/conftest.pyc;ò EcÝDc@sådkZdkZdkZdkZeiieƒZeiieƒZeii eƒeii deƒeiieƒZei i eƒei idƒ o@eiieddƒZeiieƒoeieƒqándS(Nis PASTE_TESTINGs test_webappssoutput(ssyssossshutils pkg_resourcesspathsdirnames__file__sheresbasesappendsinserts working_sets add_entrysenvironsgetsjoins output_dirsexistssrmtree(s pkg_resourcessheressyssbases output_dirsshutilsos((s>build/bdist.darwin-8.7.0-Power_Macintosh/egg/tests/conftest.pys?s    PK’± 5tests/test_units/__init__.pyPKÇ«'5Mæ™™tests/test_units/__init__.pyc;ò EcÝDc@sdS(N((((sIbuild/bdist.darwin-8.7.0-Power_Macintosh/egg/tests/test_units/__init__.pys?sPKÁ°5ï +»¾¾'tests/test_webapps/test_make_project.pyimport urllib import os from paste.fixture import * import pkg_resources for spec in ['PasteScript', 'Paste', 'PasteDeploy', 'pylons']: pkg_resources.require(spec) template_path = os.path.join( os.path.dirname(__file__), 'test_files').replace('\\','/') test_environ = os.environ.copy() test_environ['PASTE_TESTING'] = 'true' testenv = TestFileEnvironment( os.path.join(os.path.dirname(__file__), 'output').replace('\\','/'), template_path=template_path, environ=test_environ) projenv = None def _get_script_name(script): if sys.platform == 'win32': script += '.exe' return script def svn_repos_setup(): res = testenv.run(_get_script_name('svnadmin'), 'create', 'REPOS', printresult=False) path = testenv.base_path.replace('\\','/').replace(' ','%20') base = 'file://' if ':' in path: base = 'file:///' testenv.svn_url = base + path + '/REPOS' assert 'REPOS' in res.files_created testenv.ignore_paths.append('REPOS') def paster_create(): global projenv sys.stderr.write(' '.join(['paster', 'create', '--verbose', '--no-interactive', '--svn-repository=' + testenv.svn_url, '--template=pylons', 'ProjectName', 'version=0.1', ])) res = testenv.run(_get_script_name('paster'), 'create', '--verbose', '--no-interactive', '--svn-repository=' + testenv.svn_url, '--template=pylons', 'ProjectName', 'version=0.1', ) expect_fn = ['projectname', 'development.ini', 'setup.cfg', 'README.txt', 'setup.py', 'ProjectName.egg-info', ] for fn in expect_fn: fn = os.path.join('ProjectName', fn) #~ if fn not in res.files_created.keys(): #~ sys.stderr.write('ERROR not creates %r'%fn) #~ if fn not in res.stdout: #~ sys.stderr.write('ERROR not in stdout %r'%fn) assert fn in res.files_created.keys() assert fn in res.stdout setup = res.files_created[os.path.join('ProjectName','setup.py')] setup.mustcontain('0.1') setup.mustcontain('projectname:make_app') setup.mustcontain('main=paste.script.appinstall:Installer') setup.mustcontain("include_package_data=True") assert '0.1' in setup testenv.run(_get_script_name('python')+' setup.py egg_info', cwd=os.path.join(testenv.cwd, 'ProjectName').replace('\\','/'), expect_stderr=True) testenv.run(_get_script_name('svn'), 'commit', '-m', 'Created project', 'ProjectName') # A new environment with a new projenv = TestFileEnvironment( os.path.join(testenv.base_path, 'ProjectName').replace('\\','/'), start_clear=False, template_path=template_path, environ=test_environ) projenv.environ['PYTHONPATH'] = ( projenv.environ.get('PYTHONPATH', '') + ':' + projenv.base_path) def make_controller(): res = projenv.run(_get_script_name('paster')+' controller sample') assert os.path.join('projectname','controllers','sample.py') in res.files_created assert os.path.join('projectname','tests','functional','test_sample.py') in res.files_created res = projenv.run(_get_script_name('svn')+' status') # Make sure all files are added to the repository: assert '?' not in res.stdout def _do_proj_test(copydict, emptyfiles=[]): """Given a dict of files, where the key is a filename in test_files, the value is the destination in the new projects dir. emptyfiles is a list of files that should be created and empty.""" for original, newfile in copydict.iteritems(): projenv.writefile(newfile, frompath=original) for fi in emptyfiles: projenv.writefile(fi) res = projenv.run(_get_script_name('nosetests')+' projectname/tests', expect_stderr=True, cwd=os.path.join(testenv.cwd, 'ProjectName').replace('\\','/')) def do_pytest(): _do_proj_test({'development.ini':'development.ini'}) def do_test_known(): copydict = { 'controller_sample.py':'projectname/controllers/sample.py', 'app_globals.py':'projectname/lib/app_globals.py', 'functional_sample_controller_sample1.py':'projectname/tests/functional/test_sample.py', } _do_proj_test(copydict) def do_kid_default(): copydict = { 'testkid.kid':'projectname/kidtemplates/testkid.kid', 'middleware_def_engine.py':'projectname/config/middleware.py', 'functional_sample_controller_sample2.py':'projectname/tests/functional/test_sample2.py' } empty = ['projectname/kidtemplates/__init__.py'] _do_proj_test(copydict, empty) def do_two_engines(): copydict = { 'middleware_two_engines.py':'projectname/config/middleware.py', 'test_myghty.myt':'projectname/templates/test_myghty.myt', 'functional_sample_controller_sample3.py':'projectname/tests/functional/test_sample2.py', } _do_proj_test(copydict) def do_crazy_decorators(): _do_proj_test({'functional_sample_controller_sample4.py':'projectname/tests/functional/test_sample3.py'}) def do_legacy_app(): legacyenv = TestFileEnvironment( os.path.join(testenv.base_path, 'legacyapp').replace('\\','/'), start_clear=False, template_path=template_path, environ=test_environ) res = legacyenv.run(_get_script_name('nosetests')+' legacyapp/tests', expect_stderr=True, cwd=os.path.join(testenv.cwd, 'legacyapp').replace('\\','/')) def make_tag(): global tagenv res = projenv.run(_get_script_name('svn')+' commit -m "updates"') # Space at the end needed so run() doesn't add \n causing svntag to complain res = projenv.run(_get_script_name('python')+' setup.py svntag --version=0.5 ') # XXX Still fails => setuptools problem on win32? assert 'Tagging 0.5 version' in res.stdout assert 'Auto-update of version strings' in res.stdout res = testenv.run(_get_script_name('svn')+' co %s/ProjectName/tags/0.5 Proj-05 ' % testenv.svn_url) setup = res.files_created['Proj-05/setup.py'] setup.mustcontain('0.5') assert 'Proj-05/setup.cfg' not in res.files_created tagenv = TestFileEnvironment( os.path.join(testenv.base_path, 'Proj-05').replace('\\','/'), start_clear=False, template_path=template_path) def test_project(): yield svn_repos_setup yield paster_create yield make_controller yield do_pytest yield do_test_known yield do_kid_default yield do_two_engines yield do_crazy_decorators #yield do_legacy_app #yield make_tag PKÇ«'58gê%ê%(tests/test_webapps/test_make_project.pyc;ò »¿÷Dc@sSdkZdkZdkTdkZx'ddddgD]Zeieƒq5Weiieiie ƒdƒi ddƒZ ei i ƒZd ed <%init> from datetime import datetime mytime = datetime.now() PK’± 5ÃM^\\)tests/test_webapps/test_files/testkid.kid Hello from Kid

Hello from Kid

You visited the URL ${h.url_for()} at ${datetime.datetime.now()}

PKÆ«'5“×2¤EGG-INFO/dependency_links.txtPKÆ«'5s…BÙ••¤<EGG-INFO/entry_points.txtPK˜± 5“×2¤EGG-INFO/not-zip-safePKÆ«'5^çWÉ# # ¤<EGG-INFO/PKG-INFOPKÆ«'5ßs,餎 EGG-INFO/requires.txtPKÆ«'5iÃgãã¤ßEGG-INFO/SOURCES.txtPKÆ«'5zm\ ¤ô!EGG-INFO/top_level.txtPK®"5Þpíí¤5"pylons/__init__.pyPKÇ«'5›diBJJ¤R%pylons/__init__.pycPK-£'5÷%¸×B"B"¤Í*pylons/commands.pyPKÇ«'5dº1Z2&2&¤?Mpylons/commands.pycPK¬¢'5ð”hY%Y%¤¢spylons/config.pyPKÇ«'5‰ö×–)#)#¤)™pylons/config.pycPK‘A'5@BR\¢¢¤¼pylons/controllers.pyPKÇ«'5¾1†+Ö&Ö&¤VÜpylons/controllers.pycPK“± 5«®”u¤`pylons/database.pyPKÇ«'5àí/yy¤¨pylons/database.pycPK“± 5þQ8¬¬¤R2pylons/decorator.pyPKÇ«'5,â> ——¤/Epylons/decorator.pycPK“± 5¶?˜™S™S¤ø`pylons/error.pyPKÇ«'5nèMYMY¤¾´pylons/error.pycPKho5]CìHH¤9pylons/helpers.pyPKÇ«'5Ô«Ó*1 1 ¤°pylons/helpers.pycPK‘A'5#mÙçXX¤ pylons/legacy.pyPKÇ«'5¼³é±±¤—'pylons/legacy.pycPKp›5ï«Ì×¶¶¤w8pylons/middleware.pyPKÇ«'5ü8ç]"]"¤_Rpylons/middleware.pycPK†¨'5?’‚L0L0¤ïtpylons/templating.pyPKÇ«'57þ77¤m¥pylons/templating.pycPK¬¢'5Ž×†­­¤0Ýpylons/util.pyPKÇ«'5@Ý_oï"ï"¤ òpylons/util.pycPKlª'5¤»±:±:¤%pylons/wsgiapp.pyPKÇ«'5Ül®:®:¤Ppylons/wsgiapp.pycPK‘A'5[Ä$Ö Ö ¤ãŠpylons/decorators/__init__.pyPKÇ«'5¡g­\¦¦¤ô—pylons/decorators/__init__.pycPK“± 5ÂöÉn¤Ö¨pylons/decorators/rest.pyPKÇ«'5݇!  ¤"°pylons/decorators/rest.pycPK’± 5¤;¯™Ì̤y»pylons/i18n/__init__.pyPKÇ«'5n…Wé&&¤zÊpylons/i18n/__init__.pycPK’± 5½`*€€¤Öàpylons/i18n/msgfmt.pyPKÇ«'5Ä7pä䤉öpylons/i18n/msgfmt.pycPK’± 5³eqZVZV¤¡ pylons/i18n/pygettext.pyPKÇ«'5vÜåùŒYŒY¤1bpylons/i18n/pygettext.pycPK’± 5o¾Ý¯¯¤ô»pylons/i18n/translation.pyPKÇ«'5¯÷Ñ凇¤Û½pylons/i18n/translation.pycPK’± 5­ Žþþ¤›Ápylons/media/img/bar-bg.pngPK’± 5ùû6HG)G)¤ÒÃpylons/media/img/bg.jpgPK’± 5È1ÄÄÄ!¤Nípylons/media/img/hatch-yellow.pngPK’± 5h3ƒÖÖ¤Qîpylons/media/img/header.pngPK’± 5€?AÄĤ`ïpylons/media/img/highlight.pngPK’± 5tQØt77¤`ðpylons/media/img/icon-16.pngPK’± 5Hò-%%¤Ññpylons/media/img/logo.gifPK’± 5,ˆ’ÍÍ#¤-pylons/media/img/main-nav-bg-on.pngPK’± 5Aù¸ôô ¤;pylons/media/img/main-nav-bg.pngPK’± 5#>ÀÈii¤mpylons/media/img/plus.jpgPK’± 5Â×öC¤ pylons/media/img/tab-brown.pngPK’± 5ǘŸåå¤Mpylons/media/img/tab-white.pngPK’± 5XÝÉT)¤n pylons/media/img/tab-yellow-highlight.pngPK’± 5^Й7CC¤Ôpylons/media/img/tab-yellow.pngPK’± 5SÃúO¤Tpylons/media/img/warning.gifPK’± 5Ÿ;“,#,#¤Žpylons/media/style/orange.cssPK“± 5¤õ8pylons/templates/__init__.pyPKÇ«'5d¶¨™™¤/9pylons/templates/__init__.pycPK“± 5Ï_¦–‚‚#¤:pylons/templates/controller.py_tmplPK“± 5Ç ¬"ÆÆ(¤Æ:pylons/templates/test_controller.py_tmplPK¬¢'5²´n  5¤Ò;pylons/templates/paster_template/development.ini_tmplPK“± 51é ××0¤2Apylons/templates/paster_template/README.txt_tmplPK“± 5LêãEÝÝ/¤WCpylons/templates/paster_template/setup.cfg_tmplPKj«'5£d`x.¤Fpylons/templates/paster_template/setup.py_tmplPK¬¢'5-د++Q¤ëHpylons/templates/paster_template/+egg+.egg-info/paste_deploy_config.ini_tmpl_tmplPK“± 5«¹OZŒŒ;¤…Npylons/templates/paster_template/+package+/__init__.py_tmplPK“± 51UsD}};¤jOpylons/templates/paster_template/+package+/websetup.py_tmplPK“± 5€Œ¥B¤@Ppylons/templates/paster_template/+package+/config/__init__.py_tmplPK“± 5®R7ÊÊE¤¢Ppylons/templates/paster_template/+package+/config/environment.py_tmplPK“± 5ÚÂÁD¤ÏTpylons/templates/paster_template/+package+/config/middleware.py_tmplPK»5¢Eê˜aaA¤E]pylons/templates/paster_template/+package+/config/routing.py_tmplPK“± 5G¤apylons/templates/paster_template/+package+/controllers/__init__.py_tmplPK“± 5|DzGttD¤japylons/templates/paster_template/+package+/controllers/error.py_tmplPK«¢'5½BG¤@fpylons/templates/paster_template/+package+/controllers/template.py_tmplPK“± 5cOÉjAA>¤©jpylons/templates/paster_template/+package+/docs/index.txt_tmplPK“± 5@¤Flpylons/templates/paster_template/+package+/i18n/__init__.py_tmplPK“± 5?¤¤lpylons/templates/paster_template/+package+/lib/__init__.py_tmplPK“± 5qv½)’’B¤mpylons/templates/paster_template/+package+/lib/app_globals.py_tmplPK‹­"59 ««;¤óqpylons/templates/paster_template/+package+/lib/base.py_tmplPK’­"5b^å¶¶>¤÷tpylons/templates/paster_template/+package+/lib/helpers.py_tmplPK“± 54þ[[B¤ vpylons/templates/paster_template/+package+/models/__init__.py_tmplPK“± 5@ú¿A¤Äwpylons/templates/paster_template/+package+/public/index.html_tmplPK“± 5¯`‡@¤³€pylons/templates/paster_template/+package+/templates/autohandlerPK“± 5×µ@ŽÈÈA¤ pylons/templates/paster_template/+package+/tests/__init__.py_tmplPK“± 5D¤G„pylons/templates/paster_template/+package+/tests/test_models.py_tmplPK“± 5L¤©„pylons/templates/paster_template/+package+/tests/functional/__init__.py_tmplPK’± 5€Œ¥¤…tests/__init__.pyPKÇ«'5Hmu-ŽŽ¤D…tests/__init__.pycPK’± 5¬?@  ¤†tests/conftest.pyPKÇ«'5/wËßߤчtests/conftest.pycPK’± 5¤àŠtests/test_units/__init__.pyPKÇ«'5Mæ™™¤‹tests/test_units/__init__.pycPKÁ°5ï +»¾¾'¤î‹tests/test_webapps/test_make_project.pyPKÇ«'58gê%ê%(¤ñ¦tests/test_webapps/test_make_project.pycPK’± 5çLnæ&&,¤!Ítests/test_webapps/test_files/app_globals.pyPKÇ«'5Ÿ‹ãó-¤‘Îtests/test_webapps/test_files/app_globals.pycPK’± 5‚œ§‹}}2¤ùÒtests/test_webapps/test_files/controller_sample.pyPKÇ«'5v1n3¤ÆØtests/test_webapps/test_files/controller_sample.pycPK«¢'5Š Ê\-¤-étests/test_webapps/test_files/development.iniPK’± 5 LëëE¤†ïtests/test_webapps/test_files/functional_sample_controller_sample1.pyPKÇ«'5WŠ¿ã<<F¤Ô÷tests/test_webapps/test_files/functional_sample_controller_sample1.pycPK’± 5}@öŠ——E¤ttests/test_webapps/test_files/functional_sample_controller_sample2.pyPKÇ«'5oê҇F¤n tests/test_webapps/test_files/functional_sample_controller_sample2.pycPK’± 5Ál;ëGGE¤Ytests/test_webapps/test_files/functional_sample_controller_sample3.pyPKÇ«'5«^†SSF¤tests/test_webapps/test_files/functional_sample_controller_sample3.pycPK’± 5êÌù"OOE¤ºtests/test_webapps/test_files/functional_sample_controller_sample4.pyPKÇ«'5zwv­­F¤l!tests/test_webapps/test_files/functional_sample_controller_sample4.pycPK’± 5]f×}}6¤})tests/test_webapps/test_files/middleware_def_engine.pyPKÇ«'5Qëú  7¤N2tests/test_webapps/test_files/middleware_def_engine.pycPK’± 5_Í^Ù@@7¤¼<tests/test_webapps/test_files/middleware_two_engines.pyPKÇ«'5¨nãï ï 8¤QEtests/test_webapps/test_files/middleware_two_engines.pycPK’± 5îêk÷oo-¤–Otests/test_webapps/test_files/test_myghty.mytPK’± 5ÃM^\\)¤PPtests/test_webapps/test_files/testkid.kidPKvv¼&óQ