(cls, fname)
return result
Reads a graph from compressed Python pickled format, uncompressing
        it on-the-fly.

        @param fname: the name of the file or a stream to read from.
        @return: the created graph object.
Reads a graph from compressed Python pickled format, uncompressing
        it on-the-fly.
Reads a graph from compressed Python pickled format uncompressing it on - the - fly .
def Read_Picklez(cls, fname):
        """Reads a graph from compressed Python pickled format, uncompressing
        it on-the-fly.

        @param fname: the name of the file or a stream to read from.
        @return: the created graph object.
        """
        import pickle as pickle

        if hasattr(fname, "read"):
            # Probably a file or a file-like object
            if isinstance(fname, gzip.GzipFile):
                result = pickle.load(fname)
            else:
                result = pickle.load(gzip.GzipFile(mode="rb", fileobj=fname))
        else:
            result = pickle.load(gzip.open(fname, "rb"))

        if not isinstance(result, cls):
            raise TypeError("unpickled object is not a %s" % cls.__name__)

        return result
def Read_Picklez ( cls , fname ) : import pickle as pickle if hasattr ( fname , "read" ) : # Probably a file or a file-like object if isinstance ( fname , gzip . GzipFile ) : result = pickle . load ( fname ) else : result = pickle . load ( gzip . GzipFile ( mode = "rb" , fileobj = fname ) ) else : result = pickle . load ( gzip . open ( fname , "rb" ) ) if not isinstance ( result , cls ) : raise TypeError ( "unpickled object is not a %s" % cls . __name__ ) return result