MINI SHELL

Server : Apache/2.2.2 (Fedora)
System : Linux App1.pathumtani.go.th 2.6.20-1.2320.fc5smp #1 SMP Tue Jun 12 19:40:16 EDT 2007 i686
User : apache ( 48)
PHP Version : 5.2.9
Disable Function : NONE
Directory :  /proc/self/root/usr/lib/python2.4/site-packages/mx/Misc/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //proc/self/root/usr/lib/python2.4/site-packages/mx/Misc/LazyModule.pyo
mς
υΤ5;c@sdZdfd„ƒYZdS(s Helper to enable simple lazy module import. 

    'Lazy' means the actual import is deferred until an attribute is
    requested from the module's namespace. This has the advantage of
    allowing all imports to be done at the top of a script (in a
    prominent and visible place) without having a great impact
    on startup time.

    Copyright (c) 1999-2000, Marc-Andre Lemburg; mailto:mal@lemburg.com
    See the documentation for further information on copyrights,
    or contact the author. All Rights Reserved.
t
LazyModulecBs,tZdZed„Zd„Zd„ZRS(sα Lazy module class.

        Lazy modules are imported into the given namespaces whenever a
        non-special attribute (there are some attributes like __doc__
        that class instances handle without calling __getattr__) is
        requested. The module is then registered under the given name
        in locals usually replacing the import wrapper instance. The
        import itself is done using globals as global namespace.

        Example of creating a lazy load module:

        ISO = LazyModule('ISO',locals(),globals())

        Later, requesting an attribute from ISO will load the module
        automatically into the locals() namespace, overriding the
        LazyModule instance:

        t = ISO.Week(1998,1,1)

    cCst||_|djo
|}n||_|iddƒ}|o|d||_	||_
n||_	|_
dS(sε Create a LazyModule instance wrapping module name.

            The module will later on be registered in locals under the
            given module name.

            globals is optional and defaults to locals.
        
        t__name__tt.N(tlocalstselft
__locals__tglobalstNonet__globals__tgettmainnametnameRt__importname__(RRRRR((t6/usr/lib/python2.4/site-packages/mx/Misc/LazyModule.pyt__init__#s		

	
cCsO|i}t||i|idƒ|i|<}|ii|iƒt	||ƒS(s  Import the module now.
        t*N(RR
Rt
__import__RR	tmodulet__dict__tupdatetgetattrtwhat(RRRR((Rt__getattr__8s
	&cCsd|iS(Ns<lazy module '%s'>(RR(R((Rt__repr__Js(Rt
__module__t__doc__RRRR(((RR
s	N(RR(R((Rt?s

Anon7 - 2021