eric5.UtilitiesPython2.Tools

Module implementing tool functions.

Global Attributes

coding_regexps

Classes

None

Functions

decode Function to decode a text.
get_coding Function to get the coding of a text.
normalizeCode Function to normalize the given code.
readEncodedFile Function to read a file and decode it's contents into proper text.


decode

decode(text)

Function to decode a text.

text
text to decode (string)
Returns:
decoded text and encoding
Up


get_coding

get_coding(text)

Function to get the coding of a text.

text
text to inspect (string)
Returns:
coding string
Up


normalizeCode

normalizeCode(codestring)

Function to normalize the given code.

codestring
code to be normalized (string)
Returns:
normalized code (string)
Up


readEncodedFile

readEncodedFile(filename)

Function to read a file and decode it's contents into proper text.

filename
name of the file to read (string)
Returns:
tuple of decoded text and encoding (string, string)
Up