cubes_lite/model/reader.py
def read(self, source):
        """Reads a model description from `source` which can be a filename, URL,
        file-like object or a path to a directory. Returns a model
        description dictionary."""

        if not isinstance(source, compat.string_type):
            return json.load(source)

        parts = compat.urlparse(source)
        if parts.scheme in ('', 'file') and os.path.isdir(parts.path):
            source = parts.path
            return self.read_bundle(source)
        elif len(parts.scheme) == 1 and os.path.isdir(source):
            # TODO: same hack as in _json_from_url
            return self.read_bundle(source)
        else:
            return self.load_json(source)
Reads a model description from `source` which can be a filename, URL,
        file-like object or a path to a directory. Returns a model
        description dictionary.
Reads a model description from `source` which can be a filename, URL,
file-like object or a path to a directory. Returns a model
description dictionary.
Reads a model description from ` source ` which can be a filename URL file - like object or a path to a directory . Returns a model description dictionary .
def read(self, source):
        if not isinstance(source, compat.string_type):
            return json.load(source)
        parts = compat.urlparse(source)
        if parts.scheme in ('', 'file') and os.path.isdir(parts.path):
            source = parts.path
            return self.read_bundle(source)
        elif len(parts.scheme) == 1 and os.path.isdir(source):
            return self.read_bundle(source)
        else:
            return self.load_json(source)
def read ( self , source ) : if not isinstance ( source , compat . string_type ) : return json . load ( source ) parts = compat . urlparse ( source ) if parts . scheme in ( '' , 'file' ) and os . path . isdir ( parts . path ) : source = parts . path return self . read_bundle ( source ) elif len ( parts . scheme ) == 1 and os . path . isdir ( source ) : return self . read_bundle ( source ) else : return self . load_json ( source )
Reads a model description from `source` which can be a filename, URL,
file-like object or a path to a directory.
Reads a model description from ` source ` which can be a filename URL file - like object or a path to a directory .
"""Reads a model description from `source` which can be a filename, URL,
        file-like object or a path to a directory. Returns a model
        description dictionary.""" # TODO: same hack as in _json_from_url
self
source