403Webshell
Server IP : 61.19.30.66  /  Your IP : 216.73.216.15
Web Server : Apache/2.2.22 (Ubuntu)
System : Linux klw 3.11.0-15-generic #25~precise1-Ubuntu SMP Thu Jan 30 17:39:31 UTC 2014 x86_64
User : www-data ( 33)
PHP Version : 5.3.10-1ubuntu3.48
Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,
MySQL : ON  |  cURL : OFF  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : OFF
Directory :  /usr/lib/python2.7/dist-packages/twisted/spread/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /usr/lib/python2.7/dist-packages/twisted/spread/util.pyc
ó
[³XMc@sdZddlmZddlmZddlmZddlmZddlm	Z	ddl
mZddd	„ƒYZd
dd„ƒYZ
ddd
„ƒYZddd„ƒYZdefd„ƒYZdefd„ƒYZdejfd„ƒYZd„ZdS(s
Utility classes for spread.
iÿÿÿÿ(tdefer(tFailure(tpb(tbasic(t
interfaces(t
implementstLocalMethodcBseZd„Zd„ZRS(cCs||_||_dS(N(tlocaltname(tselfRR((s7/usr/lib/python2.7/dist-packages/twisted/spread/util.pyt__init__s	cOs|jj|j||ŽS(N(Rt
callRemoteR(R	targstkw((s7/usr/lib/python2.7/dist-packages/twisted/spread/util.pyt__call__s(t__name__t
__module__R
R(((s7/usr/lib/python2.7/dist-packages/twisted/spread/util.pyRs	t
LocalAsRemotecBs&eZdZdZd„Zd„ZRS(sN
    A class useful for emulating the effects of remote behavior locally.
    icOs‘t|d|ƒr-t|d|ƒ||ŽSy-t|d|ƒ}tj|||ŽƒSWn0tƒ}|jr|jƒntj|ƒSXdS(sx
        Call a specially-designated local method.

        self.callRemote('x') will first try to invoke a method named
        sync_x and return its result (which should probably be a
        Deferred).  Second, it will look for a method called async_x,
        which will be called and then have its result (or Failure)
        automatically wrapped in a Deferred.
        tsync_tasync_N(thasattrtgetattrRtsucceedRtreportAllTracebackstprintTracebacktfail(R	RRR
tmethodtf((s7/usr/lib/python2.7/dist-packages/twisted/spread/util.pyR#s
		
cCs
t||ƒS(N(R(R	R((s7/usr/lib/python2.7/dist-packages/twisted/spread/util.pytremoteMethod8s(RRt__doc__RRR(((s7/usr/lib/python2.7/dist-packages/twisted/spread/util.pyRs	tLocalAsyncForwardercBs,eZdZdd„Zd„Zd„ZRS(sD
    A class useful for forwarding a locally-defined interface.
    icCs4|j|ƒst‚||_||_||_dS(N(t
providedBytAssertionErrort	forwardedtinterfaceClasstfailWhenNotImplemented(R	R!R"R#((s7/usr/lib/python2.7/dist-packages/twisted/spread/util.pyR
As		cOst|j|ƒ||ŽS(N(RR!(R	RRR
((s7/usr/lib/python2.7/dist-packages/twisted/spread/util.pyt_callMethodGscOse|jj|ƒr1tj|j|||Ž}|S|jrTtjttd|ƒƒStj	dƒSdS(NsNo Such Method in Interface: %s(R"tqueryDescriptionForRt
maybeDeferredR$R#RRtNotImplementedErrorRtNone(R	RRR
tresult((s7/usr/lib/python2.7/dist-packages/twisted/spread/util.pyRJs	(RRRR
R$R(((s7/usr/lib/python2.7/dist-packages/twisted/spread/util.pyR<s	tPagercBs>eZdZdd„Zd„Zd„Zd„Zd„ZRS(s5
    I am an object which pages out information.
    cOsYt|ƒr*||_||_||_n	d|_d|_||_|jj|ƒdS(sƒ
        Create a pager with a Reference to a remote collector and
        an optional callable to invoke upon completion.
        iN(	tcallabletcallbacktcallbackArgstcallbackKeywordR(t_stillPagingt	collectortbrokertregisterPageProducer(R	R0R,RR
((s7/usr/lib/python2.7/dist-packages/twisted/spread/util.pyR
Zs					cCsK|jsD|jjdƒ|jdk	rD|j|j|jŽqDn|jS(s5
        (internal) Method called by Broker.
        tendedPagingN(R/R0RR,R(R-R.(R	((s7/usr/lib/python2.7/dist-packages/twisted/spread/util.pytstillPagingis
	cCs|jjd|jƒƒdS(s5
        (internal) Method called by Broker.
        tgotPageN(R0RtnextPage(R	((s7/usr/lib/python2.7/dist-packages/twisted/spread/util.pytsendNextPagesscCs
tƒ‚dS(sO
        Override this to return an object to be sent to my collector.
        N(R'(R	((s7/usr/lib/python2.7/dist-packages/twisted/spread/util.pyR6yscCs
d|_dS(s4
        Call this when you're done paging.
        iN(R/(R	((s7/usr/lib/python2.7/dist-packages/twisted/spread/util.pyt
stopPagingsN(	RRRR(R
R4R7R6R8(((s7/usr/lib/python2.7/dist-packages/twisted/spread/util.pyR*Vs	
		tStringPagercBs&eZdZddd„Zd„ZRS(s:
    A simple pager that splits a string into chunks.
    i cOs8||_d|_||_tj|||||ŽdS(Ni(tstringtpointert	chunkSizeR*R
(R	R0tstR<R,RR
((s7/usr/lib/python2.7/dist-packages/twisted/spread/util.pyR
Šs			cCsX|j|j|j|j!}|j|j7_|jt|jƒkrT|jƒn|S(N(R:R;R<tlenR8(R	tval((s7/usr/lib/python2.7/dist-packages/twisted/spread/util.pyR6s

N(RRRR(R
R6(((s7/usr/lib/python2.7/dist-packages/twisted/spread/util.pyR9†st	FilePagercBsTeZdZeejƒdd„Zd„Zd„Z	d„Z
d„Zd„ZRS(sC
    Reads a file in chunks and sends the chunks as they come.
    cOs3g|_tj|||||Ž|j|ƒdS(N(tchunksR*R
tstartProducing(R	R0tfdR,RR
((s7/usr/lib/python2.7/dist-packages/twisted/spread/util.pyR
žs	cs8tjƒj|ˆƒˆ_ˆjj‡fd†ƒdS(Ncs
ˆjƒS(N(R8(tx(R	(s7/usr/lib/python2.7/dist-packages/twisted/spread/util.pyt<lambda>¥s(Rt
FileSendertbeginFileTransfertdeferredtaddBoth(R	RC((R	s7/usr/lib/python2.7/dist-packages/twisted/spread/util.pyRB£scCs#||_|s|jjƒndS(N(tproducertresumeProducing(R	RJt	streaming((s7/usr/lib/python2.7/dist-packages/twisted/spread/util.pytregisterProducer§s	cCs
d|_dS(N(R(RJ(R	((s7/usr/lib/python2.7/dist-packages/twisted/spread/util.pytunregisterProducer¬scCs|jj|ƒdS(N(RAtappend(R	tchunk((s7/usr/lib/python2.7/dist-packages/twisted/spread/util.pytwrite¯scCsC|js
dS|jjdƒ}|jjƒ|jjd|ƒdS(sD
        Get the first chunk read and send it to collector.
        NiR5(RAtpopRJRKR0R(R	R?((s7/usr/lib/python2.7/dist-packages/twisted/spread/util.pyR7²s
	
N(
RRRRRt	IConsumerR(R
RBRMRNRQR7(((s7/usr/lib/python2.7/dist-packages/twisted/spread/util.pyR@˜s
				tCallbackPageCollectorcBs)eZdZd„Zd„Zd„ZRS(sµ
    I receive pages from the peer. You may instantiate a Pager with a
    remote reference to me. I will call the callback with a list of pages
    once they are all received.
    cCsg|_||_dS(N(tpagesR,(R	R,((s7/usr/lib/python2.7/dist-packages/twisted/spread/util.pyR
Äs	cCs|jj|ƒdS(N(RURO(R	tpage((s7/usr/lib/python2.7/dist-packages/twisted/spread/util.pytremote_gotPageÈscCs|j|jƒdS(N(R,RU(R	((s7/usr/lib/python2.7/dist-packages/twisted/spread/util.pytremote_endedPagingËs(RRRR
RWRX(((s7/usr/lib/python2.7/dist-packages/twisted/spread/util.pyRT¾s		cOs/tjƒ}|j|t|jƒ||Ž|S(sr
    A utility method that will call a remote method which expects a
    PageCollector as the first argument.
    (RtDeferredRRTR,(t
referenceablet
methodNameRR
td((s7/usr/lib/python2.7/dist-packages/twisted/spread/util.pytgetAllPagesÏsN(((((Rttwisted.internetRttwisted.python.failureRttwisted.spreadRttwisted.protocolsRRtzope.interfaceRRRRR*R9R@t
ReferenceableRTR](((s7/usr/lib/python2.7/dist-packages/twisted/spread/util.pyt<module>	s	0&

Youez - 2016 - github.com/yon3zu
LinuXploit