Your IP : 172.28.240.42


Current Path : /usr/lib/python2.7/dist-packages/twisted/internet/
Upload File :
Current File : //usr/lib/python2.7/dist-packages/twisted/internet/gtk2reactor.pyc

ó
±ZOc@sCdZddlZdejkr0edƒ‚ndejd<y/eedƒskddlZejdƒnWneefk
r…nXddl	Z	ee	dƒr®e	j
ƒnddlmZdd	l
mZd
ejfd„ƒYZdejfd
„ƒYZed„Zed„Zejjƒdkr6eZndgZdS(s>
This module provides support for Twisted to interact with the glib/gtk2
mainloop.

In order to use this support, simply do the following::

    from twisted.internet import gtk2reactor
    gtk2reactor.install()

Then use twisted.internet APIs as usual.  The other methods here are not
intended to be called directly.
iÿÿÿÿNtgiszIntrospected and static glib/gtk bindings must not be mixed; can't import gtk2reactor since gi module is already imported.tfrozens2.0tthreads_init(t	_glibbase(truntimetGtk2ReactorcBsWeZdZejejBejBZejZ	ej
Ze	eBZeeBZ
ed„ZRS(s&
    PyGTK+ 2 event loop reactor.
    cCsAd}|tkr!ddl}ntjj|t|d|ƒdS(NiÿÿÿÿtuseGtk(tNonetTruetgtkRtGlibReactorBaset__init__tgobject(tselfRt_gtk((s@/usr/lib/python2.7/dist-packages/twisted/internet/gtk2reactor.pyR@s(t__name__t
__module__t__doc__RtIO_HUPtIO_ERRtIO_NVALt_POLL_DISCONNECTEDtIO_INt_POLL_INtIO_OUTt	_POLL_OUTtINFLAGStOUTFLAGSRR(((s@/usr/lib/python2.7/dist-packages/twisted/internet/gtk2reactor.pyR2s		

tPortableGtkReactorcBseZdZed„ZRS(sd
    Reactor that works on Windows.

    Sockets aren't supported by GTK+'s input_add on Win32.
    cCsAd}|tkr!ddl}ntjj|t|d|ƒdS(NiÿÿÿÿR(RRR	RtPortableGlibReactorBaseRR(R
RR((s@/usr/lib/python2.7/dist-packages/twisted/internet/gtk2reactor.pyROs
(RRRRR(((s@/usr/lib/python2.7/dist-packages/twisted/internet/gtk2reactor.pyRIscCs*t|ƒ}ddlm}||ƒ|S(sÐ
    Configure the twisted mainloop to be run inside the gtk mainloop.

    @param useGtk: should glib rather than GTK+ event loop be
        used (this will be slightly faster but does not support GUI).
    iÿÿÿÿ(tinstallReactor(Rttwisted.internet.mainR(RtreactorR((s@/usr/lib/python2.7/dist-packages/twisted/internet/gtk2reactor.pytinstallXs
cCs'tƒ}ddlm}||ƒ|S(sK
    Configure the twisted mainloop to be run inside the gtk mainloop.
    iÿÿÿÿ(R(RRR(RR R((s@/usr/lib/python2.7/dist-packages/twisted/internet/gtk2reactor.pytportableInstalles	
tposixR!(RtsystmodulestImportErrorRthasattrtpygtktrequiretAttributeErrorRRttwisted.internetRttwisted.pythonRR
RRRRR!R"tplatformtgetTypet__all__(((s@/usr/lib/python2.7/dist-packages/twisted/internet/gtk2reactor.pyt<module>s.