'Returns a file-like object with a read() method,
from the given file path or string.'

def _open(self, path):

    if (isinstance(path, basestring) and os.path.exists(path)):
        return open(path, 'rb')
    if hasattr(path, 'read'):
        return path
    return StringIO.StringIO(path)
