Text Management Python scripts - Top 4 Download

Text Management Python script downloads

Indices of a SubString in a Given String

This script uses string.index(sub) function which returns a list of indices of ALL occurances of a substring in the string. ...
Python

Convert string to hex

Convert string to hex script converts each char to hex representation and back. ...
Python

Implementing an Immutable Dictionary

This script represents the implementation of a dictionary, whose items cannot be reset or deleted, nor new can be added. ...
Python

Read a text file by paragraph

Text files are most often read by-line, with excellent direct Python support. Sometimes you need to use other units, such as the paragraph -- a sequence of non-empty lines separated by empty lines. Python doesn't support that directly, but, this script adds such functionality. ...
Python

Read a text file backwards

This script presents another way to read a file line by line, starting at the end. ...
Python

Replacing a portion of a string

This script allows you to replace a portion of a string at a given position. ...
Python

Checking whether a string contains a set of chars

This script contains a function to check on the occurence of a set of characters. ...
Python

Converting Between Different Naming Convetions

These short functions convert identifier names between the most common naming conventions: CapitalizedWords, mixedCase and under_scores. ...
Python

Changing the indentation of a multi line string

When working with text, it may be necessary to change the indentation level of a block. This code will take a multiline string and add or remove leading spaces to each line so that the indentation level of the block matches some absolute number of spaces. ...
Python

Smart pluralisation

Smart pluralisation script has a function that provides more intelligence than simply adding an 's' to the end of a word. ...
Python

Change line endings

When working between platforms, it is often necessary to convert the line endings on files for them to work, especially when it comes to code. Pass Unix Python code with and it goes nowhere. Same on Mac Python with . This code simply and easily fixes the problem. ...
Python

Blender Script

This script allows you to run a very simple templating-system. ...
Python

Fill paragraph

This module contains a function that formats paragraphs of text to have a certain linewidth, optionally stretching lines to that width by filling word gaps with spaces. In other words, it does left-justified/word-wrapped and block formatted paragraphs. ...
Python

Searching nested strings

This script searches nested strings from a line of text. The strings are limited by two different characters. ...
Python

Extract verbatim texts from LaTeX file

This script extracts contents of all verbatim environments from the LaTeX file specified on command line. Modified LaTeX code with verbatiminput commands instead of verbatim is produced on the standard output. ...
Python

Build section numbers for a table of contents

This script shows a way to generate section numbers for a nested document structure. It can be used within a recursive algorithm to build a table of contents. ...
Python

Indent text like email clients

Indent text like email clients script helps you to manage the text identation. ...
Python

TextWrapper

This script overrides the Python built in function TextWrapper.wrap with an implementation that handles spiltting a document into paragraphs and processing each individually. This allows things such as initial_indent to work as expected. ...
Python

Custom String Representations of Bases

Custom String Representations of Bases script allows you to make a number shorter(like timestamps in URLs). ...
Python