def readFromFile(fileName, length=(-1)):
 global memory_files
 data = None
 if (not (fileName in memory_files)):
  log.debug(("Memory File `%s' does not exist (yet?)." % fileName))
  return None
 log.debug(("Opening memory file `%s' for reading." % fileName))
 memory_files[fileName].seek(0)
 data = memory_files[fileName].read(length)
 return data

def readFromFile ( fileName , length = ( - 1 ) ) : global memory_files data = None if ( not ( fileName in memory_files ) ) : log . debug ( ( "Memory File `%s' does not exist (yet?)." % fileName ) ) return None log . debug ( ( "Opening memory file `%s' for reading." % fileName ) ) memory_files [ fileName ] . seek ( 0 ) data = memory_files [ fileName ] . read ( length ) return data
read length amount of bytes from the given filename if length equals -1 .