INNER CODE UNIT · Python

type_cast_value

BortonWrightonLabs/DRAM · bin/adjectives.py:18

    def type_cast_value(self, ctx, value):
        try:
            return ast.literal_eval(value)
        except Exception as e:
            logger.error(e)
            raise click.BadParameter(value)


def get_assets_path(local_path):
    """
    Locate the package data or non python files

    :param local_path:
    :returns:
    """
    abs_snake_path = os.path.join(
        os.path.dirname(os.path.abspath(__file__)), "assets", local_path
    )

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…