parameters: (self, source)
return_statement: return stream
docstring: Produces a file object from source.
  
  
  
          source can be either a file object, local filename or a string.
docstring_summary: Produces a file object from source.
docstring_tokens: Produces a file object from source .
function: def openStream(self, source):
  
          """Produces a file object from source.
  
  
  
          source can be either a file object, local filename or a string.
  
  
  
          """
  
          # Already a file object
  
          if hasattr(source, 'read'):
  
              stream = source
  
          else:
  
              stream = StringIO(source)
  
  
  
          return stream
function_tokens: def openStream ( self , source ) : # Already a file object if hasattr ( source , 'read' ) : stream = source else : stream = StringIO ( source ) return stream