ÿØÿà JFIF ÿþ
ÿÛ C
ÿÛ C ÿÀ ÿÄ ÿÄ " #QrÿÄ ÿÄ & 1! A"2qQaáÿÚ ? Øy,æ/3JæÝ¹Èß²Ø5êXw²±ÉyR¾I0ó2PI¾IÌÚiMö¯þrìN&"KgX:íµnTJnLK
@!-ýùúmë;ºgµ&ó±hw¯Õ@Ü9ñ-ë.²1<yà¹ïQÐUÛ?.¦èûbß±©Ö«Âw*V) `$bØÔëXÖ-ËTÜíGÚ3ð«g §¯JxU/ÂÅv_s(Hÿ @TñJÑãõçn!ÈgfbÓc:él[ðQe9ÀPLbÃãCµm[5¿ç'ªjglåÛí_§Úõl-;"PkÞÞÁQâ¼_Ñ^¢S x?"¸¦ùYé¨ÒOÈ q`~~ÚtËU¹CÚêV I1Áß_ÿÙ
aNc @ s d Z d d l Z y d d l m Z Wn n Xd d l m Z d e f d YZ d e f d YZ d Z d
e f d YZ
d a d a
i a d Z d S(
s WSGI Paste wrapper for mod_python. Requires Python 2.2 or greater.
Example httpd.conf section for a Paste app with an ini file::
SetHandler python-program
PythonHandler paste.modpython
PythonOption paste.ini /some/location/your/pasteconfig.ini
Or if you want to load a WSGI application under /your/homedir in the module
``startup`` and the WSGI app is ``app``::
SetHandler python-program
PythonHandler paste.modpython
PythonPath "['/virtual/project/directory'] + sys.path"
PythonOption wsgi.application startup::app
If you'd like to use a virtual installation, make sure to add it in the path
like so::
SetHandler python-program
PythonHandler paste.modpython
PythonPath "['/virtual/project/directory', '/virtual/lib/python2.4/'] + sys.path"
PythonOption paste.ini /virtual/project/directory/pasteconfig.ini
Some WSGI implementations assume that the SCRIPT_NAME environ variable will
always be equal to "the root URL of the app"; Apache probably won't act as
you expect in that case. You can add another PythonOption directive to tell
modpython_gateway to force that behavior:
PythonOption SCRIPT_NAME /mcontrol
Some WSGI applications need to be cleaned up when Apache exits. You can
register a cleanup handler with yet another PythonOption directive:
PythonOption wsgi.cleanup module::function
The module.function will be called with no arguments on server shutdown,
once for each child process or thread.
This module highly based on Robert Brewer's, here:
http://projects.amor.org/misc/svn/modpython_gateway.py
iN( t apache( t loadappt InputWrapperc B sG e Z d Z d Z d d Z d d Z d d Z d Z RS( c C s
| | _ d S( N( t req( t selfR ( ( s@ /opt/alt/python27/lib/python2.7/site-packages/paste/modpython.pyt __init__> s c C s d S( N( ( R ( ( s@ /opt/alt/python27/lib/python2.7/site-packages/paste/modpython.pyt closeA s ic C s | j j | S( N( R t read( R t size( ( s@ /opt/alt/python27/lib/python2.7/site-packages/paste/modpython.pyR D s c C s | j j | S( N( R t readline( R R ( ( s@ /opt/alt/python27/lib/python2.7/site-packages/paste/modpython.pyR G s c C s | j j | S( N( R t readlines( R t hint( ( s@ /opt/alt/python27/lib/python2.7/site-packages/paste/modpython.pyR
J s c c s. | j } x | r) | V| j } q Wd S( N( R ( R t line( ( s@ /opt/alt/python27/lib/python2.7/site-packages/paste/modpython.pyt __iter__M s ( t __name__t
__module__R R R R R
R
( ( ( s@ /opt/alt/python27/lib/python2.7/site-packages/paste/modpython.pyR <