dev.py 文件源码

python
阅读 29 收藏 0 点赞 0 评论 0

项目:SuperOcto 作者: mcecchi 项目源码 文件源码
def plugin_uninstall(self):
        @click.command("uninstall")
        @click.argument("name")
        def command(name):
            """Uninstalls the plugin with the given name."""
            import sys

            lower_name = name.lower()
            if not lower_name.startswith("octoprint_") and not lower_name.startswith("octoprint-"):
                click.echo("This doesn't look like an OctoPrint plugin name")
                sys.exit(1)

            call = [sys.executable, "-m", "pip", "uninstall", "--yes", name]
            self.command_caller.call(call)

        return command
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号