Ejemplo n.º 1
0
    def get_directory(self):
        """Returns the path of the directory.

        Returns:
            The absolute path of MLplrimitive directory.
        """
        mypath = mlblocks.get_primitives_paths()[-1]
        return mypath
Ejemplo n.º 2
0
def _get_primitives(pattern):
    primitives = list()
    for base_path in get_primitives_paths():
        if os.path.exists(base_path):
            for filename in os.listdir(base_path):
                if pattern in filename and filename.endswith('.json'):
                    primitives.append(filename[:-5])

    return list(sorted(primitives))
Ejemplo n.º 3
0
def path():
    path = mlblocks.get_primitives_paths()[-1]
    return path