config root man

Current Path : /compat/linux/proc/self/root/usr/local/lib/python2.5/

FreeBSD hs32.drive.ne.jp 9.1-RELEASE FreeBSD 9.1-RELEASE #1: Wed Jan 14 12:18:08 JST 2015 root@hs32.drive.ne.jp:/sys/amd64/compile/hs32 amd64
Upload File :
Current File : //compat/linux/proc/self/root/usr/local/lib/python2.5/csv.pyc

³ò
h”Rc@s°dZddkZddklZlZlZlZlZlZl	Z	l
Z
lZlZl
Z
lZlZlZddklZyddklZWn#ej
oddklZnXdddd	d
ddd
ddddddddddgZddd„ƒYZdefd„ƒYZedeƒd
efd„ƒYZedeƒdd d„ƒYZdd!d„ƒYZyeWnej
o
eZnXdd"d„ƒYZdS(#s+
csv.py - read/write/investigate CSV files
iÿÿÿÿN(tErrort__version__twritertreadertregister_dialecttunregister_dialecttget_dialectt
list_dialectstfield_size_limitt
QUOTE_MINIMALt	QUOTE_ALLtQUOTE_NONNUMERICt
QUOTE_NONEt__doc__(tDialect(tStringIOR	R
RRRRtexcelt	excel_tabRRRRRtSnifferRRt
DictReadert
DictWritercBsVeZdZdZeZdZdZdZ	dZ
dZdZdZ
d„Zd„ZRS(sÇDescribe an Excel dialect.

    This must be subclassed (see csv.excel).  Valid attributes are:
    delimiter, quotechar, escapechar, doublequote, skipinitialspace,
    lineterminator, quoting.

    tcCs+|itjo
t|_n|iƒdS(N(t	__class__RtTruet_validt	_validate(tself((s/usr/local/lib/python2.5/csv.pyt__init__+s
cCs<yt|ƒWn'tj
o}tt|ƒƒ‚nXdS(N(t_Dialectt	TypeErrorRtstr(Rte((s/usr/local/lib/python2.5/csv.pyR0sN(t__name__t
__module__R
t_nametFalseRtNonet	delimitert	quotechart
escapechartdoublequotetskipinitialspacetlineterminatortquotingRR(((s/usr/local/lib/python2.5/csv.pyRs	cBs2eZdZdZdZeZeZdZ	e
ZRS(s;Describe the usual properties of Excel-generated CSV files.t,t"s
(R R!R
R%R&RR(R#R)R*R	R+(((s/usr/local/lib/python2.5/csv.pyR7scBseZdZdZRS(sEDescribe the usual properties of Excel-generated TAB-delimited files.s	(R R!R
R%(((s/usr/local/lib/python2.5/csv.pyRAss	excel-tabcBs/eZddddd„Zd„Zd„ZRS(RcOsI||_||_||_t||||Ž|_||_d|_dS(Ni(t
fieldnamestrestkeytrestvalRtdialecttline_num(RtfR.R/R0R1targstkwds((s/usr/local/lib/python2.5/csv.pyRHs				cCs|S(N((R((s/usr/local/lib/python2.5/csv.pyt__iter__QscCsý|iiƒ}|idjo||_|iiƒ}n|ii|_x!|gjo|iiƒ}qMWtt|i|ƒƒ}t|iƒ}t|ƒ}||jo||||i<n7||jo)x&|i|D]}|i	||<qÞWn|S(N(
RtnextR.R$R2tdicttziptlenR/R0(Rtrowtdtlftlrtkey((s/usr/local/lib/python2.5/csv.pyR7Ts$	


N(R R!R$RR6R7(((s/usr/local/lib/python2.5/csv.pyRGs		cBs5eZdddd„Zd„Zd„Zd„ZRS(RtraiseRcOs[||_||_|iƒdjotd|‚n||_t||||Ž|_dS(NR@tignores-extrasaction (%s) must be 'raise' or 'ignore'(R@signore(R.R0tlowert
ValueErrortextrasactionR(RR3R.R0RDR1R4R5((s/usr/local/lib/python2.5/csv.pyRls			cCsy|idjo8x5|iƒD]#}||ijo
td‚qqWng}|iD]}||i||iƒqV~S(NR@s&dict contains fields not in fieldnames(RDtkeysR.RCtgetR0(Rtrowdicttkt_[1]R?((s/usr/local/lib/python2.5/csv.pyt
_dict_to_listws
cCs|ii|i|ƒƒS(N(RtwriterowRJ(RRG((s/usr/local/lib/python2.5/csv.pyRK~scCs=g}x$|D]}|i|i|ƒƒq
W|ii|ƒS(N(tappendRJRt	writerows(RtrowdictstrowsRG((s/usr/local/lib/python2.5/csv.pyRMs
(R R!RRJRKRM(((s/usr/local/lib/python2.5/csv.pyRks

		cBs>eZdZd„Zdd„Zd„Zd„Zd„ZRS(se
    "Sniffs" the format of a CSV file (i.e. delimiter, quotechar)
    Returns a Dialect object.
    cCsdddddg|_dS(NR,s	t;t t:(t	preferred(R((s/usr/local/lib/python2.5/csv.pyR’scCsŽ|i||ƒ\}}}|p|i||ƒ\}}n|p
td‚ndtfd„ƒY}||_|pd|_||_|S(sI
        Returns a dialect (or None) corresponding to the sample
        sCould not determine delimiterR1cBs eZdZdZeZeZRS(tsniffeds
(R R!R"R*R	R+R#R((((s/usr/local/lib/python2.5/csv.pyR1¥sR-(t_guess_quote_and_delimitert_guess_delimiterRRR%R&R)(Rtsamplet
delimitersR&R%R)R1((s/usr/local/lib/python2.5/csv.pytsniff—s	
		cCsÿg}xEdD]=}ti|titiBƒ}|i|ƒ}|oPq
q
W|pdSnh}h}d}x|D]}	|idd}
|	|
}|o|i|dƒd||<ny|id	d}
|	|
}Wntj
o
qvnX|o8|djp
||jo|i|dƒd||<ny|id
d}
Wntj
o
qvnX|	|
o|d7}qvqvWt	|d„|i
ƒƒ}|oFt	|d„|i
ƒƒ}
||
|j}|
d
jo
d}
qòn
d}
d}||
|fS(s
        Looks for text enclosed between two identical quotes
        (the probable quotechar) which are preceded and followed
        by the same character (the probable delimiter).
        For example:
                         ,'some text',
        The quote with the most wins, same with the delimiter.
        If there is no quotechar the delimiter can't be determined
        this way.
        sF(?P<delim>[^\w
"'])(?P<space> ?)(?P<quote>["']).*?(?P=quote)(?P=delim)sC(?:^|
)(?P<quote>["']).*?(?P=quote)(?P<delim>[^\w
"'])(?P<space> ?)sD(?P<delim>>[^\w
"'])(?P<space> ?)(?P<quote>["']).*?(?P=quote)(?:$|
)s*(?:^|
)(?P<quote>["']).*?(?P=quote)(?:$|
)RitquoteitdelimtspacecSs ||||jo|p|S(((tatbtquotes((s/usr/local/lib/python2.5/csv.pyt<lambda>ãscSs ||||jo|p|S(((R]R^tdelims((s/usr/local/lib/python2.5/csv.pyR`çss
(sF(?P<delim>[^\w
"'])(?P<space> ?)(?P<quote>["']).*?(?P=quote)(?P=delim)sC(?:^|
)(?P<quote>["']).*?(?P=quote)(?P<delim>[^\w
"'])(?P<space> ?)sD(?P<delim>>[^\w
"'])(?P<space> ?)(?P<quote>["']).*?(?P=quote)(?:$|
)s*(?:^|
)(?P<quote>["']).*?(?P=quote)(?:$|
)N(RNi(tretcompiletDOTALLt	MULTILINEtfindallR$t
groupindexRFtKeyErrortreduceRE(RtdataRXtmatchestrestrtregexpR_RatspacestmtnR?R&R[R)((s/usr/local/lib/python2.5/csv.pyRU´sZ	
!
cCs:td|idƒƒ}g}tdƒD]}|t|ƒq)~}tdt|ƒƒ}d}h}h}	h}
dt|t|ƒƒ}}x¥|t|ƒjo‘|d7}xk|||!D]\}
xS|D]K}|i|hƒ}|
i|ƒ}|i|dƒd||<|||<qÉWq¼WxÓ|i	ƒD]Å}||i
ƒ}t|ƒdjo|dddjoq)nt|ƒdjo_td„|ƒ|	|<|i|	|ƒ|	|d|	|dtd„|ƒdf|	|<q)|d|	|<q)W|	i
ƒ}t
||ƒ}d}d	}x©t|
ƒdjo•||joˆxw|D]o\}}|ddjoR|ddjoA|d||jo(|djp
||jo||
|<q³qDqDW|d
8}qWt|
ƒdjoH|
i	ƒd}|di|ƒ|did|ƒj}||fSn|}||7}q‘W|
pdSnt|
ƒdjocx`|iD]Q}||
i	ƒjo8|di|ƒ|did|ƒj}||fSqbqbWng}|
i
ƒD]\}}|||fqÌ~}|iƒ|d
d}|di|ƒ|did|ƒj}||fS(s¼
        The delimiter /should/ occur the same number of times on
        each row. However, due to malformed data, it may not. We don't want
        an all or nothing approach, so we allow for small variations in this
        number.
          1) build a table of the frequency of each character on every line.
          2) build a table of freqencies of this frequency (meta-frequency?),
             e.g.  'x occurred 5 times in 10 rows, 6 times in 1000 rows,
             7 times in 2 rows'
          3) use the mode of the meta-frequency to determine the /expected/
             frequency for that character
          4) find out how often the character actually meets that goal
          5) the character that best meets its goal is the delimiter
        For performance reasons, the data is evaluated in chunks, so it can
        try and evaluate the smallest portion of the data possible, evaluating
        additional chunks as necessary.
        s
ii
iicSs |d|djo|p|S(i((R]R^((s/usr/local/lib/python2.5/csv.pyR`#scSsd|d|dfS(ii((R]R^((s/usr/local/lib/python2.5/csv.pyR`)sgð?gÍÌÌÌÌÌì?g{®Gáz„?s%c RiÿÿÿÿN(Ri(tfilterR$tsplittrangetchrtminR:RFtcountREtitemsRitremovetfloatRStsort(RRjRXRItctasciitchunkLengtht	iterationt
charFrequencytmodesRatstarttendtlinetchart
metaFrequencytfreqRwtmodeListttotaltconsistencyt	thresholdRHtvR[R)R<t_[2]((s/usr/local/lib/python2.5/csv.pyRVôs†-

(	
	 "
3
c
Cs*tt|ƒ|i|ƒƒ}|iƒ}t|ƒ}h}xt|ƒD]}d||<qIWd}x	|D]}|djoPn|d7}t|ƒ|joqjnxÂ|iƒD]´}	xYtt	t
tgD]5}
y|
||	ƒPWqÌtt
fj
oqÌXqÌWt||	ƒ}
|
t	jo
t}
n|
||	jo*||	djo|
||	<qg||	=q³q³WqjWd}x¨|iƒD]š\}	}t|ƒtdƒjo3t||	ƒ|jo|d7}q|d8}q‚y|||	ƒWn#ttfj
o|d7}q‚X|d8}q‚W|djS(Niii(RRRYR7R:RsR$REtinttlongRytcomplexRCt
OverflowErrorRwttypeR(
RRWtrdrtheadertcolumnstcolumnTypestitcheckedR;tcoltthisTypet	hasHeadertcolType((s/usr/local/lib/python2.5/csv.pyt
has_header]sX




	


N(	R R!R
RR$RYRURVRœ(((s/usr/local/lib/python2.5/csv.pyRs		@	i(((((R
Rbt_csvRRRRRRRRRR	R
RRRRt	cStringIORtImportErrort__all__RRRRRt	NameErrorRyR(((s/usr/local/lib/python2.5/csv.pys<module>s.^

$

Man Man