Most viewed recipes tagged "text_files"http://code.activestate.com/recipes/tags/text_files/views/2014-10-29T17:38:10-07:00ActiveState Code RecipesSplit Up Text File by Line Count (Python) 2012-02-19T23:40:47-08:00Andrew Yurisichhttp://code.activestate.com/recipes/users/4180867/http://code.activestate.com/recipes/578045-split-up-text-file-by-line-count/ <p style="color: grey"> Python recipe 578045 by <a href="/recipes/users/4180867/">Andrew Yurisich</a> (<a href="/recipes/tags/split/">split</a>, <a href="/recipes/tags/text_files/">text_files</a>). Revision 5. </p> <p>Splits a large text file into smaller ones, based on line count. Original file is unmodified.</p> <p>Resulting text files are stored in the same directory as the original file.</p> <p>Useful for breaking up text based logs or blocks of email logins into smaller parts.</p> Encrypt and Decrypt Text and Text Files (BETA) (Python) 2011-11-22T04:18:15-08:00Alexander James Wallarhttp://code.activestate.com/recipes/users/4179768/http://code.activestate.com/recipes/577954-encrypt-and-decrypt-text-and-text-files-beta/ <p style="color: grey"> Python recipe 577954 by <a href="/recipes/users/4179768/">Alexander James Wallar</a> (<a href="/recipes/tags/cryptography/">cryptography</a>, <a href="/recipes/tags/cryptology/">cryptology</a>, <a href="/recipes/tags/decrypt/">decrypt</a>, <a href="/recipes/tags/decryption/">decryption</a>, <a href="/recipes/tags/encrypt/">encrypt</a>, <a href="/recipes/tags/encryption/">encryption</a>, <a href="/recipes/tags/hidding/">hidding</a>, <a href="/recipes/tags/math/">math</a>, <a href="/recipes/tags/python/">python</a>, <a href="/recipes/tags/text/">text</a>, <a href="/recipes/tags/text_files/">text_files</a>). Revision 7. </p> <p>This program interactively lets you encrypt and decrypt text as well as text files using a key system as well as a cipher.</p> Print selected text pages to PDF with Python, selpg and xtopdf on Linux (Bash) 2014-10-29T17:38:10-07:00Vasudev Ramhttp://code.activestate.com/recipes/users/4173351/http://code.activestate.com/recipes/578954-print-selected-text-pages-to-pdf-with-python-selpg/ <p style="color: grey"> Bash recipe 578954 by <a href="/recipes/users/4173351/">Vasudev Ram</a> (<a href="/recipes/tags/bash/">bash</a>, <a href="/recipes/tags/linux/">linux</a>, <a href="/recipes/tags/pdf/">pdf</a>, <a href="/recipes/tags/python/">python</a>, <a href="/recipes/tags/reportlab/">reportlab</a>, <a href="/recipes/tags/shell/">shell</a>, <a href="/recipes/tags/text/">text</a>, <a href="/recipes/tags/text_files/">text_files</a>, <a href="/recipes/tags/text_processing/">text_processing</a>, <a href="/recipes/tags/unix/">unix</a>). </p> <p>This recipe shows how to use selpg, a Linux command-line utility written in C, together with xtopdf, a Python toolkit for PDF creation, to print only a selected range of pages from a text file, to a PDF file, for display or print purposes. The way to do this is to run the selpg utility at the Linux command line, with options specifying the start and end pages of the range, and pipe its output to the StdinToPDF.py program, which is a part of the xtopdf toolkit.</p>