403Webshell
Server IP : 182.53.201.61  /  Your IP : 216.73.217.175
Web Server : Apache/2.2.15 (Fedora)
System : Linux km10.dyndns.org 2.6.31.5-127.fc12.i686.PAE #1 SMP Sat Nov 7 21:25:57 EST 2009 i686
User : apache ( 48)
PHP Version : 5.3.3
Disable Function : NONE
MySQL : ON  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : ON
Directory :  /usr/lib/python2.6/site-packages/paste/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /usr/lib/python2.6/site-packages/paste//reloader.pyo
Ñò
•ÊIc
@sádZddkZddkZddkZddkZddkZddklZdd„Zde	fd„ƒYZ
eiidƒoDydd	k
lZWnej
oqËXd
e
fd„ƒYZne
iZe
iZdS(sÊ
A file monitor and server restarter.

Use this like:

..code-block:: Python

    import reloader
    reloader.install()

Then make sure your server is installed with a shell script like::

    err=3
    while test "$err" -eq 3 ; do
        python server.py
        err="$?"
    done

or is run from this .bat file (if you use Windows)::

    @echo off
    :repeat
        python server.py
    if %errorlevel% == 3 goto repeat

or run a monitoring process in Python (``paster serve --reload`` does
this).  

Use the ``watch_file(filename)`` function to cause a reload/restart for
other other non-Python files (e.g., configuration files).  If you have
a dynamic set of files that grows over time you can use something like::

    def watch_config_files():
        return CONFIG_FILE_CACHE.keys()
    paste.reloader.add_file_callback(watch_config_files)

Then every time the reloader polls files it will call
``watch_config_files`` and check all the filenames it returns.
iÿÿÿÿN(tclassinstancemethodicCs?td|ƒ}tid|iƒ}|itƒ|iƒdS(s,
    Install the reloading monitor.

    On some platforms server threads may not terminate when the main
    thread does, causing ports to remain open/locked.  The
    ``raise_keyboard_interrupt`` option creates a unignorable signal
    which causes the whole application to shut-down (rudely).
    t
poll_intervalttargetN(tMonitort	threadingtThreadtperiodic_reloadt	setDaemontTruetstart(Rtmontt((s2/usr/lib/python2.6/site-packages/paste/reloader.pytinstall2s	
RcBs_eZgZgZgZd„Zd„Zd„Zd„Ze	eƒZd„Z
e	e
ƒZ
RS(cCsSh|_t|_||_t|iƒ|_|ii|ƒt|i	ƒ|_
dS(N(t
module_mtimesRtkeep_runningRtlisttglobal_extra_filestextra_filest	instancestappendtglobal_file_callbackstfile_callbacks(tselfR((s2/usr/lib/python2.6/site-packages/paste/reloader.pyt__init__Fs			cCsBx;to3|iƒptidƒPnti|iƒqWdS(Ni(Rtcheck_reloadtost_exitttimetsleepR(R((s2/usr/lib/python2.6/site-packages/paste/reloader.pyRNs

cCs
t|iƒ}xJ|iD]?}y|i|ƒƒWqtid|IJtiƒqXqWxctii	ƒD]R}y
|i
}Wnttfj
o}qlnX|dj	o|i|ƒqlqlWxD|D]<}y-ti|ƒ}|o
|i}nd}Wnttfj
o
qÉnX|idƒo:tii|d ƒo#tti|d ƒi|ƒ}nS|idƒoBtii|d dƒo'tti|d dƒi|ƒ}n|ii|ƒp||i|<qÉ|i||jotid|IJtSqÉWtS(	Ns)Error calling paste.reloader callback %r:is.pyciÿÿÿÿs	$py.classi÷ÿÿÿs.pys%s changed; reloading...(RRRtextendtsyststderrt	tracebackt	print_exctmodulestvaluest__file__tAttributeErrortImportErrortNoneRRtstattst_mtimetOSErrortIOErrortendswithtpathtexiststmaxR
thas_keytFalseR(Rt	filenamest
file_callbacktmoduletfilenametexcR(tmtime((s2/usr/lib/python2.6/site-packages/paste/reloader.pyRZsJ




'#'
	cCshtii|ƒ}|djo5x|iD]}|i|ƒq)W|ii|ƒn|ii|ƒdS(s Watch the named file for changesN(	RR-tabspathR'Rt
watch_fileRRR(RtclsR5tinstance((s2/usr/lib/python2.6/site-packages/paste/reloader.pyR9s

cCsV|djo5x|iD]}|i|ƒqW|ii|ƒn|ii|ƒdS(s{Add a callback -- a function that takes no parameters -- that will
        return a list of filenames to watch for changes.N(R'Rtadd_file_callbackRRR(RR:tcallbackR;((s2/usr/lib/python2.6/site-packages/paste/reloader.pyR<‹s

(t__name__t
__module__RRRRRRR9RR<(((s2/usr/lib/python2.6/site-packages/paste/reloader.pyR@s			%	
	
tjava(t
SystemRestartt
JythonMonitorcBseZdZd„ZRS(s
            Monitor that utilizes Jython's special
            ``_systemrestart.SystemRestart`` exception.

            When raised from the main thread it causes Jython to reload
            the interpreter in the existing Java process (avoiding
            startup time).

            Note that this functionality of Jython is experimental and
            may change in the future.
            cCs=x6to.|iƒp
tƒ‚nti|iƒqWdS(N(RRRARRR(R((s2/usr/lib/python2.6/site-packages/paste/reloader.pyR«s


(R>R?t__doc__R(((s2/usr/lib/python2.6/site-packages/paste/reloader.pyRBs(RCRRRRR tpaste.util.classinstanceRRtobjectRtplatformt
startswitht_systemrestartRAR&RBR9R<(((s2/usr/lib/python2.6/site-packages/paste/reloader.pyt<module>)s W	

Youez - 2016 - github.com/yon3zu
LinuXploit