Esempio n. 1
0
    def do_version(self, args, arguments):
        """
        Usage:
           version [--format=FORMAT] [--check=CHECK]

        Options:
            --format=FORMAT  the format to print the versions in [default: table]
            --check=CHECK    boolean tp conduct an additional check [default: True]

        Description:
            Prints out the version number
        """

        python_version, pip_version = get_python()

        versions = {
            "cloudmesh_base": {
                "name": "cloudmesh_base",
                "version": str(cloudmesh_base.version)
            },
            "python": {
                "name": "python",
                "version": str(python_version)
            },
            "pip": {
                "name": "pip",
                "version": str(pip_version)
            }
        }

        print (dict_printer(versions, output=arguments["--format"] ,order=["name", "version"]))
        if arguments["--check"] in ["True"]:
            check_python()
Esempio n. 2
0
    def do_version(self, args):
        """
        Usage:
           version

        Prints out the version number
        """
        Console.ok("cmd3: {:}".format(str(cmd3.__version__)))
        Console.ok("cloudmesh_base: {:}".format(str(
            cloudmesh_base.__version__)))

        python_version, pip_version = get_python()

        Console.ok("python: {:}".format(str(python_version)))
        Console.ok("pip: {:}".format(str(pip_version)))

        check_python()