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/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //proc/self/root/usr/lib/python2.4/site-packages/ForgeBlackBox.pyo
mò
€MíCc@sWdkZdkZdkZdkZdklZd„Zdeifd„ƒYZdS(N(s	ProcessorcCs!|djo
t‚nt|ƒS(sä
    getBox: get a BlackBox from this module
    @box_cfg: a box_cfg conformant AdmList element containing
    the following elements:
    path: type string, the path to the context file (required)
    returns: Forge object
    N(tbox_cfgtNonet
ValueErrort
ForgeBlackBox(R((t1/usr/lib/python2.4/site-packages/ForgeBlackBox.pytgetBoxs

RcBs tZdZd„Zd„ZRS(sŽo
    The ForgeBlackBox is the class which handles converting the xml with a XSLT
    stylesheet and writing this as a configuration file
    cCs[d|_|ii|_d|_d|_d|_d|_	t
i|ƒ|i
dƒiƒ|_yTti|itiƒo7ti|iƒti}ti|ƒp
t‚q´nWntd|id‚nXyB|i
dƒiƒ|_|idjo
d|_n
d|_Wntd‚nXy|i
d	ƒiƒ|_Wntd
‚nXdS(s@
        __init__: Initialize a ForgeBlackBox
        @self: the class instance
        @box_cfg: a box_cfg conformant AdmList element containing
                  the following elements:
                  xslstylesheetpath: a string
                  configfilepath: a string
                  mode: an integer
        iitxslstylesheetpaths\ForgeBlackBox box_cfg must contain a 'xslstylesheetpath' entry pointing at a readable file (t)tconfigfilepatht
SPLITFILESs;ForgeBlackBox box_cfg must contain a 'configfilepath' entrytmodes1ForgeBlackBox box_cfg must contain a 'mode' entryN(tselftstatust	__class__t
__module__tmet_errNoRt_errStrtreadabletwritablet	AlchemisttvalidateBoxCfgRtgetChildByNametgetValuetsspathtostaccesstR_OKtstattST_MODER
tS_ISREGRtcfgpatht
splitfiles(RRR
((Rt__init__s6						



c	Cso|iƒ}|pdSntƒ}|i|iƒ|i|ƒ}|i
djoYti|i
titiBtiB|iƒ}ti|dƒ}|i|ƒ|iƒnÀtidtitiBƒ}d}xš|o’|i|ƒ}|pPqÑ|idƒ}ti|idƒtitiBtiB|iƒ}ti|dƒ}|i|idƒƒ|iƒqÑWdS(	sÛ
        Extract xml, stylesheetpath and target file from the context
        and create the configuration file.
        @self: the class instance
        @context: the context from which to extract information
        itws^^--------CUTFILEHERE: (?P<filename>.*?)$(?P<content>.*?)^--------ENDFILEHERE?(?P<remaining>.*)it	remainingtfilenametcontentN(tcontextttoXMLt
xml_stringt	Processort	processortappendStylesheetFileRRt	runStringtresultR RtopenRtO_WRONLYtO_CREATtO_TRUNCR
tfdtfdopentfiletwritetclosetretcompilet	MULTILINEtDOTALLtmyregtmatchtsearchtgroup(	RR&R(R4R2R-R*R<R;((RR5Hs0	,
2(t__name__Rt__doc__R!R5(((RRs	,(	RRR7Rtxml.xslt.ProcessorR)RtBlackBoxR(RRR7RRRR)((Rt?s				
	

Anon7 - 2021