eólico

Un módulo de script y python de línea de comandos para trabajar con archivos de texto de archivo de línea de línea (EOL)
Descargar ahora

eólico Clasificación y resumen

Anuncio publicitario

  • Rating:
  • Licencia:
  • MIT/X Consortium Lic...
  • Precio:
  • FREE
  • Nombre del editor:
  • Trent Mick
  • Sitio web del editor:
  • http://code.google.com/u/trentm/

eólico Etiquetas


eólico Descripción

Un script de línea de comandos y un módulo de Python para trabajar con caracteres de archivo de línea de línea de texto (EOL) EOL es a la vez un script de línea de comandos y un módulo de Python para trabajar con caracteres de final de línea en los archivos de texto. TXT: Mac Classic (CR) FOO_CRLF.TXT: Windows (CRLF) FOO_EMPTY.TXT: NO EOLS FOO_LF.TXT: UNIX (LF) FOO_MIXED.TXT: MIXTO, PREDOMINAMENTE UNIX (LF) Recursivamente: $ EOL -R ~ / SRC / redis /users/trentm/src/redis/.gitignore: unix (lf) /users/trentm/src/redis/betatesting.txt: UNIX (LF) / Usuarios / TRENTM / SRC / REDIS / BURS: UNIX (LF) / Usuarios / TRENTM / SRC / REDIS / COPIA: UNIX (LF) ... /users/trentm/src/redis/zmalloc.h: UNIX (LF) /users/trentm/src/redis/.git/head: Unix ( Lf) /users/trentm/src/redis/.git/config: UNIX (LF) ... / usuarios / trentm / src / redis / client-bibliotecas / léame: UNIX (LF) / Usuarios / TRENTM / SRC / REDIS / Documentos de diseño / Redis-Cluster: UNIX (LF) /users/trentm/src/redis/doc/appendonlyfilehowto.html: unix (lf) /users/trentm/src/redis/doc/authcommand.html: UNIX (LF ) ... ** Encuentre archivos ** con el estilo EOL dado: $ EOL -F CRLF -X .SVN -R ~ / SRC / python /users/trentm/src/python/doc/make.bat /users/trentm/src/python/lib/email/test/data/msg_26.txt / usuarios / trentm / src / python / lib / codificaciones / CP720 .py /users/trentm/src/python/lib/test/decimaltdata/and.det ... /users/trentm/src/python/pc/vs8.0/x64.vsprops / usuarios / trentm / src / python / PCBUILD / PCBUILD.SLN ... ** Convierte los archivos ** a un estilo EOT determinado: $ EOL ~ / SRC / PYTHON / HERRAMIENTAS / MSI / MERGE.PY / USUARIOS / TRENTM / SRC / PYTHON / TOOLS / MSI / FERGE .py: Windows (CRLF) $ EOL -C CR ~ / SRC / PYTHON / HERRAMIENTOS / MSI / MSI / MERGE.PY # Pero quién realmente quiere CR (aka Mac Classic, '\ R') EOLS. # "nativo" es un alias para el estilo EOL nativo de la plataforma actual $ EOL -C nativa ~ / SRC / Python / Tools / MSI / Merge.py convertido `/ usuarios / trentm / src / python / tools / msi / Merge.py 'a LF EOLS $ EOL ~ / SRC / PYTHON / HERRAMIENTOS / MSI / MERGE.PY /USERS/TRENTM/SRC/PYTHON/TOOLS/MSI/MEGE.PY: MÓDULO DE MÓDULO DE UNIX (LF) Ejemplos: ** Listar el Estilo EOL ** de rutas dadas: >>> Importar EOL, Glob >>> para la ruta en glob.glob ("*. Txt") >>> para la ruta en glob.glob ("*. Txt") :. .. Ruta de impresión, eol.eol_info_from_path (ruta) ... foo_cr.txt ('\ r', '\ r') # (, ) foo_crlf.txt ('\ r \ n ',' \ r \ n ') foo_empty.txt (Ninguno,' \ n ') # sugiere el EOL nativo para el contenido vacío foo_lf.txt (' \ n ',' \ n ') foo_mixed.txt (,' \ n ') recursivamente: >>> para i en eol.eol_info_from_path_patterns (, recursive = true): imprimir i ... (' / usuarios /trentm/src/redis/.gitignore ',' \ n ',' \ n ') (' /users/trentm/src/redis/betatesting.txt ',' \ n ',' \ n ') (' / Usuarios / trentm / src / redis / bugs ',' \ n ',' \ n ') (' / / usuarios / trentm / src / rojo es / copiando ',' \ n ',' \ n ') ... ** Convierte los archivos ** a un estilo EOL dado: >>> ruta = "/ usuarios / trentm / src / python / tools / msi / Merge.py ">>> eol.eol_info_from_path (ruta) ('\ r \ n', '\ r \ n') >>> eol.convert_path_eol (ruta," \ n ") >>> eol.eol_info_from_path (ruta ) ('\ n', '\ n') Requisitos: · Python


eólico Software relacionado