mò ¥YÒLc@sÀdkZdZdZdZdZdZdZddd gZd eZd „Z d „Z d „Z yEdk l Z d„Zee _dklZe eƒd„ƒZWnej onXdS(Ns0.8.2t Productions(Copyright 2009-2010, Simple Station Inc.tGPLv3sinfo@simplestation.comshttp://getmediacore.com/t __version__tdebugtipythons MediaCore/%scGstidI|IJdS(sPrint to stderr, for debugingsMediaCore DEBUGN(tsyststderrtargstNone(R((t//home/painful/public_html/mediacore/__init__.pyRscCsAdkl}dddddddd g}||d d d d ƒS(sØLaunch an ipython shell where called before finishing the request. This only works with the Pylons paster server, and obviously ipython must be installed as well. Usage:: mediacore.ipython()() (s IPShellEmbeds-pdbs-pi1s In <\#>: s-pi2s .\D.: s-pos Out<\#>: s-noseptbanners(Entering IPython. Press Ctrl-D to exit.texit_msgs$Leaving Interpreter, back to Pylons.N(t IPython.Shellt IPShellEmbedR(RR ((R R#s  cs‡d†}|S(s”MonkeyPatching decorator Described by Guido van Rossum, here: http://mail.python.org/pipermail/python-dev/2008-January/076194.html cstˆ|i|ƒ|S(N(tsetattrtclstfunct__name__(R(R(R t decorator;sN(R(RR((RR tmonkeypatch_method5s (sStaticURLParsercCs;d|d<|i|id|id|iƒ}|||ƒS(sºMonkey-patch overridden method. MediaCore doesn't use any public directory listings, or index.html files, so there's no reason to issue a redirect to normalize folder requests to have a trailing slash, as all of these URLs will 404 either way. This also avoids useless redirects for routes that have the same name as a folder in the ./public directory, such as requests for "/admin". t/t PATH_INFOtroot_directoryt cache_max_ageN(tenvirontselft __class__t directoryRRtsuptstart_response(RRRR((R t add_slashCs    (sNavigableStringcCs2t|tƒo||jSnti||ƒSdS(s±Monkey-patch inserted method. This patch is a temporary solution to the problem described here: http://bugs.launchpad.net/beautifulsoup/+bug/397997 N(t isinstancetothert_NavigableStringRtunicodet__eq__(RR ((R R#Ys(RRt __status__t __copyright__t __license__t __email__t__maintainer__t__all__t USER_AGENTRRRtpaste.urlparsertStaticURLParserRt BeautifulSouptNavigableStringR!R#t ImportError(R$R(R%RR)R&R#RR'R*RR,RRRR!((R t?s&