def cli(packages, virtualenv, python, use_ipython, shell, keep, use_editor, tmpdir, index): # pylint: disable=too-many-arguments
"""Easily try out python packages."""
if not packages:
raise click.BadArgumentUsage("At least one package is required.")
if not shell and use_ipython:
shell = "ipython"
click.echo("==> Use python {0}".format(click.style(python, bold=True)))
if shell:
click.echo("==> Use shell {0}".format(click.style(shell, bold=True)))
click.echo("[*] Downloading packages: {0}".format(click.style(",".join(p.url for p in packages), bold=True)))
try:
envdir = try_packages(packages, virtualenv, python, shell, use_editor, keep, tmpdir, index)
except TryError as error:
click.secho("[*] {0}".format(error), fg="red")
sys.exit(1)
if keep:
click.echo("==> Have a look at the try environment at: {0}".format(envdir))
评论列表
文章目录