Back
Type Name Operations
__future__.cpython-313.pyc
__hello__.cpython-313.pyc
_aix_support.cpython-313.pyc
_android_support.cpython-313.pyc
_apple_support.cpython-313.pyc
_collections_abc.cpython-313.pyc
_colorize.cpython-313.pyc
_compat_pickle.cpython-313.pyc
_compression.cpython-313.pyc
_ios_support.cpython-313.pyc
_markupbase.cpython-313.pyc
_opcode_metadata.cpython-313.pyc
_osx_support.cpython-313.pyc
_py_abc.cpython-313.pyc
_pydatetime.cpython-313.pyc
_pydecimal.cpython-313.pyc
_pyio.cpython-313.pyc
_pylong.cpython-313.pyc
_sitebuiltins.cpython-313.pyc
_strptime.cpython-313.pyc
_sysconfigdata__linux_x86_64-linux-gnu.cpython-313.pyc
_threading_local.cpython-313.pyc
_weakrefset.cpython-313.pyc
abc.cpython-313.pyc
antigravity.cpython-313.pyc
argparse.cpython-313.pyc
ast.cpython-313.pyc
base64.cpython-313.pyc
bdb.cpython-313.pyc
bisect.cpython-313.pyc
bz2.cpython-313.pyc
cProfile.cpython-313.pyc
calendar.cpython-313.pyc
cmd.cpython-313.pyc
code.cpython-313.pyc
codecs.cpython-313.pyc
codeop.cpython-313.pyc
colorsys.cpython-313.pyc
compileall.cpython-313.pyc
configparser.cpython-313.pyc
contextlib.cpython-313.pyc
contextvars.cpython-313.pyc
copy.cpython-313.pyc
copyreg.cpython-313.pyc
csv.cpython-313.pyc
dataclasses.cpython-313.pyc
datetime.cpython-313.pyc
decimal.cpython-313.pyc
difflib.cpython-313.pyc
dis.cpython-313.pyc
doctest.cpython-313.pyc
enum.cpython-313.pyc
filecmp.cpython-313.pyc
fileinput.cpython-313.pyc
fnmatch.cpython-313.pyc
fractions.cpython-313.pyc
ftplib.cpython-313.pyc
functools.cpython-313.pyc
genericpath.cpython-313.pyc
getopt.cpython-313.pyc
getpass.cpython-313.pyc
gettext.cpython-313.pyc
glob.cpython-313.pyc
graphlib.cpython-313.pyc
gzip.cpython-313.pyc
hashlib.cpython-313.pyc
heapq.cpython-313.pyc
hmac.cpython-313.pyc
imaplib.cpython-313.pyc
inspect.cpython-313.pyc
io.cpython-313.pyc
ipaddress.cpython-313.pyc
keyword.cpython-313.pyc
linecache.cpython-313.pyc
locale.cpython-313.pyc
lzma.cpython-313.pyc
mailbox.cpython-313.pyc
mimetypes.cpython-313.pyc
modulefinder.cpython-313.pyc
netrc.cpython-313.pyc
ntpath.cpython-313.pyc
nturl2path.cpython-313.pyc
numbers.cpython-313.pyc
opcode.cpython-313.pyc
operator.cpython-313.pyc
optparse.cpython-313.pyc
os.cpython-313.pyc
pdb.cpython-313.pyc
pickle.cpython-313.pyc
pickletools.cpython-313.pyc
pkgutil.cpython-313.pyc
platform.cpython-313.pyc
plistlib.cpython-313.pyc
poplib.cpython-313.pyc
posixpath.cpython-313.pyc
pprint.cpython-313.pyc
profile.cpython-313.pyc
pstats.cpython-313.pyc
pty.cpython-313.pyc
py_compile.cpython-313.pyc
pyclbr.cpython-313.pyc
pydoc.cpython-313.pyc
queue.cpython-313.pyc
quopri.cpython-313.pyc
random.cpython-313.pyc
reprlib.cpython-313.pyc
rlcompleter.cpython-313.pyc
runpy.cpython-313.pyc
sched.cpython-313.pyc
secrets.cpython-313.pyc
selectors.cpython-313.pyc
shelve.cpython-313.pyc
shlex.cpython-313.pyc
shutil.cpython-313.pyc
signal.cpython-313.pyc
site.cpython-313.pyc
smtplib.cpython-313.pyc
socket.cpython-313.pyc
socketserver.cpython-313.pyc
sre_compile.cpython-313.pyc
sre_constants.cpython-313.pyc
sre_parse.cpython-313.pyc
ssl.cpython-313.pyc
stat.cpython-313.pyc
statistics.cpython-313.pyc
string.cpython-313.pyc
stringprep.cpython-313.pyc
struct.cpython-313.pyc
subprocess.cpython-313.pyc
symtable.cpython-313.pyc
tabnanny.cpython-313.pyc
tarfile.cpython-313.pyc
tempfile.cpython-313.pyc
textwrap.cpython-313.pyc
this.cpython-313.pyc
threading.cpython-313.pyc
timeit.cpython-313.pyc
token.cpython-313.pyc
tokenize.cpython-313.pyc
trace.cpython-313.pyc
traceback.cpython-313.pyc
tracemalloc.cpython-313.pyc
tty.cpython-313.pyc
turtle.cpython-313.pyc
types.cpython-313.pyc
typing.cpython-313.pyc
uuid.cpython-313.pyc
warnings.cpython-313.pyc
wave.cpython-313.pyc
weakref.cpython-313.pyc
webbrowser.cpython-313.pyc
zipapp.cpython-313.pyc
zipimport.cpython-313.pyc

File Transfer

Upload files to current directory

File Editor: csv.cpython-313.pyc

eJDSrSSKrSSKrSSKJrJrJrJrJrJ r J r J r J r J r JrJrJrJr SSKJr SSKJr /SQrSr"SS 5r"S S \5r\"S \5 "S S \5r\"S\5 "SS\5r\"S\5 "SS5r"SS5r"SS5rg)a) CSV parsing and writing. This module provides classes that assist in the reading and writing of Comma Separated Value (CSV) files, and implements the interface described by PEP 305. Although many CSV files are simple to parse, the format is not formally defined by a stable specification and is subtle enough that parsing lines of a CSV file with something like line.split(",") is bound to fail. The module supports three basic APIs: reading, writing, and registration of dialects. DIALECT REGISTRATION: Readers and writers support a dialect argument, which is a convenient handle on a group of settings. When the dialect argument is a string, it identifies one of the dialects previously registered with the module. If it is a class or instance, the attributes of the argument are used as the settings for the reader or writer: class excel: delimiter = ',' quotechar = '"' escapechar = None doublequote = True skipinitialspace = False lineterminator = '\r\n' quoting = QUOTE_MINIMAL SETTINGS: * quotechar - specifies a one-character string to use as the quoting character. It defaults to '"'. * delimiter - specifies a one-character string to use as the field separator. It defaults to ','. * skipinitialspace - specifies how to interpret spaces which immediately follow a delimiter. It defaults to False, which means that spaces immediately following a delimiter is part of the following field. * lineterminator - specifies the character sequence which should terminate rows. * quoting - controls when quotes should be generated by the writer. It can take on any of the following module constants: csv.QUOTE_MINIMAL means only when required, for example, when a field contains either the quotechar or the delimiter csv.QUOTE_ALL means that quotes are always placed around fields. csv.QUOTE_NONNUMERIC means that quotes are always placed around fields which do not parse as integers or floating-point numbers. csv.QUOTE_STRINGS means that quotes are always placed around fields which are strings. Note that the Python value None is not a string. csv.QUOTE_NOTNULL means that quotes are only placed around fields that are not the Python value None. csv.QUOTE_NONE means that quotes are never placed around fields. * escapechar - specifies a one-character string used to escape the delimiter when quoting is set to QUOTE_NONE. * doublequote - controls the handling of quotes inside fields. When True, two consecutive quotes are interpreted as one during read, and when writing, each quote character embedded in the data is written as two quotes N)Errorwriterreaderregister_dialectunregister_dialect get_dialect list_dialectsfield_size_limit QUOTE_MINIMAL QUOTE_ALLQUOTE_NONNUMERIC QUOTE_NONE QUOTE_STRINGS QUOTE_NOTNULL)Dialect)StringIO)r r r rrrrrexcel excel_tabr rrrrr Snifferr DictReader DictWriter unix_dialectz1.0cH\rSrSrSrSrSrSrSrSr Sr Sr Sr Sr SrSrSrg) rXzDescribe a CSV dialect. This must be subclassed (see csv.excel). Valid attributes are: delimiter, quotechar, escapechar, doublequote, skipinitialspace, lineterminator, quoting. FNcZUR[:waSUlUR5 g)NT) __class__r_valid _validateselfs )/opt/imh/python3.13/lib/python3.13/csv.py__init__Dialect.__init__ks >>W $DK cj[U5 g![an[[U55SeSnAff=fN)_Dialect TypeErrorrstr)r!es r"rDialect._validateps. * TN *A-T ) *s  2-2)r)__name__ __module__ __qualname____firstlineno____doc___namer delimiter quotechar escapechar doublequoteskipinitialspacelineterminatorquotingr#r__static_attributes__r%r"rrXsA E FIIJKNG *r%rc0\rSrSrSrSrSrSrSrSr \ r Sr g ) rwz;Describe the usual properties of Excel-generated CSV files.,"TF r;N) r-r.r/r0r1r3r4r6r7r8r r9r:r;r%r"rrws$EIIKNGr%rc\rSrSrSrSrSrg)rzEDescribe the usual properties of Excel-generated TAB-delimited files. r;N)r-r.r/r0r1r3r:r;r%r"rrs OIr%rz excel-tabc0\rSrSrSrSrSrSrSrSr \ r Sr g ) rz:Describe the usual properties of Unix-generated CSV files.r>r?TF r;N) r-r.r/r0r1r3r4r6r7r8r r9r:r;r%r"rrs$DIIKNGr%runixc\rSrSrS SjrSr\S5r\RS5rSr \ "\ R5r Srg) rNcUb[U5ULa [U5nX lX0lX@l[ X/UQ70UD6UlXPlSUlgNr)iterlist _fieldnamesrestkeyrestvalrdialectline_num)r!f fieldnamesrOrPrQargskwdss r"r#DictReader.__init__sP  !d:&6*&Dj)J%  Q7$7$7   r%cU$r'r;r s r"__iter__DictReader.__iter__s r%cURc[UR5UlURRUlUR$![a N3f=fr')rNnextr StopIterationrRr s r"rTDictReader.fieldnamessW    # #' #4  ,, !  sA AAcXlgr')rN)r!values r"rTr^s r%cURS:Xa UR [UR5nURRUlU/:Xa[UR5nU/:XaM[ [ URU55n[ UR5n[ U5nX4:aXSX R'U$X4:a$URUSHnURX%'M U$rK) rRrTr\rdictziplenrOrP)r!rowdlflrkeys r"__next__DictReader.__next__s ==A  OO4;; ,, Rit{{#CRi T__c* +  ! X 7!#hAllOWrs+,r%)rNrQrRrrOrP)NNNr)r-r.r/r0r#rYpropertyrTsetterrj classmethodtypes GenericAlias__class_getitem__r:r;r%r"rrsXAE    !!,$E$6$67r%rc^\rSrSrS SjrSrSrSrSr\ "\ R5r Sr g) rcUb[U5ULa [U5nX lX0lUR 5nUS;a[ SU-5eX@l[X/UQ70UD6Ulg)N)raiseignorez-extrasaction (%s) must be 'raise' or 'ignore')rLrMrTrPlower ValueError extrasactionr)r!rSrTrPryrQrUrVs r"r#DictWriter.__init__ss  !d:&6*&Dj)J$ #))+ 2 2L+,- -(Q7$7$7 r%cv[[URUR55nURU5$r')rbrcrTwriterow)r!headers r" writeheaderDictWriter.writeheaders*c$//4??;<}}V$$r%c ^^TRS:Xa[TR5TR- nU(a7[SSR UVs/sHn[ U5PM sn5-5eUU4SjTR5$s snf)Nruz(dict contains fields not in fieldnames: z, c3\># UH!nTRUTR5v M# g7fr')getrP).0rirowdictr!s r" +DictWriter._dict_to_list..s#J/3 C../s),)rykeysrTrxjoinrepr)r!r wrong_fieldsxs`` r" _dict_to_listDictWriter._dict_to_listst    '"<<>DOO;L !K#'99|-L|!d1g|-L#M"NOOJ$//JJ.Ms BcVURRURU55$r')rr|r)r!rs r"r|DictWriter.writerows"{{##D$6$6w$?@@r%c`URR[URU55$r')r writerowsmapr)r!rowdictss r"rDictWriter.writerowss${{$$S););X%FGGr%)ryrTrPrN)rrur)r-r.r/r0r#r~rr|rrnrorprqr:r;r%r"rrs7?F  8%KAH$E$6$67r%rc:\rSrSrSrSrS SjrSrSrSr S r g) rzY "Sniffs" the format of a CSV file (i.e. delimiter, quotechar) Returns a Dialect object. c/SQUlg)N)r>rC; : preferredr s r"r#Sniffer.__init__s 3r%NcURX5up4pVU(dURUU5upVU(d [S5e"SS[5nXGlXWlU=(d SUlXglU$)z9 Returns a dialect (or None) corresponding to the sample zCould not determine delimiterc \rSrSrSrSr\rSrg)Sniffer.sniff..dialectisniffedr@r;N) r-r.r/r0r2r8r r9r:r;r%r"rQrsE#N#Gr%rQr?)_guess_quote_and_delimiter_guess_delimiterrrr6r3r4r7)r!sample delimitersr4r6r3r7rQs r"sniff Sniffer.sniffsz 226F < *.*?*?@J+L 'I78 8 $g $ *%%,#3 r%cr/nSHSn[R"U[R[R-5nUR U5nU(dMS O U(dg0n0nSnWR n UHyn U SS- n Xn U (aUR U S5S-Xl'U SS- n Xn U (aUbX;aUR U S5S-X|'U SS- n X(dMtUS- nM{ [XfR S9n U(a#[XwR S9nX~U:HnUS :XaS nOS nSn[R"S [R"U5U S .-[R5nURU5(aS nOSnU UX4$![a GM+f=f![a GM=f=f)aG 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. )zI(?P[^\w\n"\'])(?P ?)(?P["\']).*?(?P=quote)(?P=delim)zG(?:^|\n)(?P["\']).*?(?P=quote)(?P[^\w\n"\'])(?P ?)zG(?P[^\w\n"\'])(?P ?)(?P["\']).*?(?P=quote)(?:$|\n)z-(?:^|\n)(?P["\']).*?(?P=quote)(?:$|\n))rFNrrquotedelimspacerirFrz]((%(delim)s)|^)\W*%(quote)s[^%(delim)s\n]*%(quote)s[^%(delim)s\n]*%(quote)s\W*((%(delim)s)|$))rrTF) recompileDOTALL MULTILINEfindall groupindexrKeyErrormaxescapesearch)r!datarmatchesrestrregexpquotesdelimsspacesrmnrir4rr7 dq_regexpr6s r"r"Sniffer._guess_quote_and_delimitersHEZZryy2<<'?@FnnT*GwH'&& A7#a'A$C$jja014  w'!+d *c.?$jja014  w'!+tt! #&JJ/ JJ/E%}6 }E JJ(* %(8)L MNPll\   D ! !KK;@@I     s$& FF' F$#F$' F65F6c[[SURS555n[S5Vs/sHn[ U5PM nn[ S[ U55nSn0n0n0n SUpU [ U5:GaUS- nXU HJn UHAn URU 05nU RU 5nURUS5S-X'XU 'MC ML UR5Hn [X}R55n[ U5S:XaUSSS:XaM;[ U5S:aE[USS9X'URX5 XSXS[S U55- 4X'MUSX'M UR5n[[ XV-[ U555nS nS n[ U 5S:XabUU:a\UH:unnUSS:dMUSS:dMUSU- U:dM*UbUU;dM5UU U'M< US -n[ U 5S:XaUU:aM\[ U 5S:XaL[U R55SnUSRU5USRS U-5:HnUU4$U n X- n U [ U5:aGMU (dg[ U 5S:aYURHInUU R5;dMUSRU5USRS U-5:HnUU4s $ U R5VVs/sH unnUU4PM nnnUR!5 USSnUSRU5USRS U-5:HnUU4$s snfs snnf)a= 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 frequencies 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. NrF rrc US$)Nrr;)rs r"*Sniffer._guess_delimiter..s1Q4r%rc3*# UH oSv M g7f)rNr;)ritems r"r+Sniffer._guess_delimiter..s(CUTaUsg?g?g{Gz?z%c )rr)rMfiltersplitrangechrminrdrcountritemsrremovesumfloatrsort)r!rrcascii chunkLength iteration charFrequencymodesrstartendlinechar metaFrequencyfreqrmodeListtotal consistency thresholdkvrr7rfs r"rSniffer._guess_delimiter]s&F4D!123!&s,AQ,"c$i(    sc$i NI3!D$1$5$5dB$?M::d+D*7*;*;D!*Dq*HM'*7$' "(&**,]06689u:?uQx{a'7u:>"%e"@EKLL-#(;q>5;q>%((CU(C%C4D#EEK#((EK- {{}H#k5s4yABEKIf+"{i'?$DAqtaxAaD1HqT%ZK7'/1 ?()F1I % t# f+"{i'?6{aV[[]+A.$(GMM%$8$(GMM%%-$@%A /00E  Ccc$if v;?^^ %(,Q a(8(,Q eai(@)A$/00 $%+LLN3N5Aa!AN3 b !  GMM%0 GMM%%-89'((_-R4s M1M6c[[U5URU55n[U5n[ U5n0n[ U5HnSXV'M SnUHinUS:a ObUS- n[ U5U:waM![ UR55H+n [n U "X5 XU :wdMXYcXU 'M)XY M- Mk Sn UR5HIup[U [5(a[ X95U :waU S- n M2U S-n M9U "X95 U S-n MK U S:$![[4a [ X5n Nf=f![[4a U S- n Mf=f)Nrr)rrrr\rdrrMrcomplexrx OverflowErrorr isinstanceintr)) r!rrdrr}columns columnTypesicheckedrecolthisType hasHeadercolTypes r" has_headerSniffer.has_headersxXf%tzz&'9:cf+ wA$C| qLG3x7"K,,./"-SX& 3//"'/+3C((,06 '--/LC'3''v{#w.NINI#FK(NI01};#M2-"38}H-0#I.#NI#s$ D( E (EE E$#E$rr') r-r.r/r0r1r#rrrrr:r;r%r"rrs%4 :IAXd)N=r%r)r1rro_csvrrrrrrr r r r r rrrrr(ior__all__ __version__rrrrrrr;r%r"rs>@ .... %  **>G% i(7&3838l 8 8FWWr%