objects.logic.utils.conversionUtil.conversionUtil Class Reference

A class containing various conversion related functions. More...

List of all members.

Public Member Functions

def __init__
def removeNonASCIICharaters
 Removes all non printable characters from a string, and replaces them with the supplied parameter.

Static Public Attributes

tuple removeNonASCIICharaters = staticmethod(removeNonASCIICharaters)


Detailed Description

A class containing various conversion related functions.

Definition at line 23 of file conversionUtil.py.


Member Function Documentation

def objects.logic.utils.conversionUtil.conversionUtil.__init__ (   self  ) 

Definition at line 24 of file conversionUtil.py.

00024                       :
00025         pass
00026     
    ## Removes all non printable characters from a string, and replaces them with the supplied parameter.

Removes all non printable characters from a string, and replaces them with the supplied parameter.

Parameters:
str Dirty string
replaceWith Printable character used to replace all non printable in the supplied string
Returns:
Clean String

Definition at line 31 of file conversionUtil.py.

00031                                                  :
00032         
00033         retVal = ""
00034         
00035         for char in str:
00036             if char in string.printable:
00037                 retVal += char
00038             else: 
00039                 retVal += replaceWith
00040             
00041         return retVal
00042                 
00043         
00044     
    removeNonASCIICharaters = staticmethod(removeNonASCIICharaters)


Member Data Documentation

Definition at line 45 of file conversionUtil.py.


The documentation for this class was generated from the following file:

Generated on Mon Mar 30 00:26:46 2009 for EyeSpy by  doxygen 1.5.8