Editra 0.6.89
Editra API Documentation
Classes | Packages | Functions | Variables
ed_txt.py File Reference

Classes

class  Editra.src.ed_txt.ReadError
 Error happened while trying to read the file. More...
class  Editra.src.ed_txt.WriteError
 Error happened while trying to write the file. More...
class  Editra.src.ed_txt.EdFile
 Wrapper for representing a file object that stores data about the file encoding and path. More...
class  Editra.src.ed_txt.FileReadJob
 Job for running an async file read in a background thread. More...
class  Editra.src.ed_txt.FileLoadEvent
 Event to signal that a chunk of text haes been read. More...

Packages

package  Editra.src.ed_txt

Functions

def Editra::src::ed_txt.CheckBom
 Try to look for a bom byte at the beginning of the given line.
def Editra::src::ed_txt.CheckMagicComment
 Try to decode the given text on the basis of a magic comment if one is present.
def Editra::src::ed_txt.DecodeString
 Decode the given string to Unicode using the provided encoding or the DEFAULT_ENCODING if None is provided.
def Editra::src::ed_txt.EncodeString
 Try and encode a given unicode object to a string with the provided encoding returning that string.
def Editra::src::ed_txt.FallbackReader
 Guess the encoding of a file by brute force by trying one encoding after the next until something succeeds.
def Editra::src::ed_txt.GuessEncoding
 Attempt to guess an encoding.
def Editra::src::ed_txt.GetEncodings
 Get a list of possible encodings to try from the locale information.

Variables

string Editra::src::ed_txt.__author__ = "Cody Precord <cprecord@editra.org>"
 Name: Cody Precord # Purpose: File abstraction layer and text utilities # Author: Cody Precord <cprecord@editra.org> # Copyright: (c) 2008 Cody Precord <staff@editra.org> # License: wxWindows License #.
string Editra::src::ed_txt.__svnid__ = "$Id: ed_txt.py 69245 2011-09-30 17:52:23Z CJP $"
string Editra::src::ed_txt.__revision__ = "$Revision: 69245 $"
tuple Editra::src::ed_txt.DEFAULT_ENCODING = locale.getpreferredencoding()
dictionary Editra::src::ed_txt.BOM
tuple Editra::src::ed_txt.RE_MAGIC_COMMENT = re.compile("coding[:=]\s*\"*([-\w.]+)\"*")
int Editra::src::ed_txt.FL_STATE_START = 0
int Editra::src::ed_txt.FL_STATE_READING = 1
int Editra::src::ed_txt.FL_STATE_PAUSED = 2
int Editra::src::ed_txt.FL_STATE_END = 3
int Editra::src::ed_txt.FL_STATE_ABORTED = 4
tuple Editra::src::ed_txt.edEVT_FILE_LOAD = wx.NewEventType()
tuple Editra::src::ed_txt.EVT_FILE_LOAD = wx.PyEventBinder(edEVT_FILE_LOAD, 1)
 All Classes Namespaces Files Functions Variables Properties