def pydroid_pip_install(argv):
    """Start installing the package, if the syntax was correct."""

    ensure_project_dir()

    if len(argv) != 1:
        print "Error: Invalid argument count: got %d instead of 1." % len(argv)
        print "Syntax: ./pydroid_pip_install package_name"
        sys.exit(1)
    else:
        install(argv[0])
예제 #2
0
def pydroid_pip_install(argv):
    """Start installing the package, if the syntax was correct."""

    ensure_project_dir()

    if len(argv) != 1:
        print "Error: Invalid argument count: got %d instead of 1." % len(argv)
        print "Syntax: ./pydroid_pip_install package_name"
        sys.exit(1)
    else:
        install(argv[0])
예제 #3
0
def rename(argv):
    """
    Check if a new app name and the new domain were specified and whether the
    no directory with the new name already exists. If so, rename the project,
    else print an error message.
    """
    ensure_project_dir()

    if len(argv) != 2:
        print "Error: Invalid argument count: got %d instead of 2." % len(argv)
        print "Syntax: ./rename new_app_name new_domain"
        sys.exit(1)
    else:
        new_name, new_domain = argv
        new_project_dir = os.path.join(pydroid_dir(), new_name)
        if os.path.exists(new_project_dir):
            print "Error: A directory with name %s already exists." % new_name
            sys.exit(1)
        else:
            rename_project(new_name, new_domain)
            print "Project successfully renamed."
            print "Execute the following to adapt the shell prompt:"
            print "cd ../%s" % new_name
예제 #4
0
def rename(argv):
    """
    Check if a new app name and the new domain were specified and whether the
    no directory with the new name already exists. If so, rename the project,
    else print an error message.
    """
    ensure_project_dir()

    if len(argv) != 2:
        print "Error: Invalid argument count: got %d instead of 2." % len(argv)
        print "Syntax: ./rename new_app_name new_domain"
        sys.exit(1)
    else:
        new_name, new_domain = argv
        new_project_dir = os.path.join(pydroid_dir(), new_name)
        if os.path.exists(new_project_dir):
            print "Error: A directory with name %s already exists." % new_name
            sys.exit(1)
        else:
            rename_project(new_name, new_domain)
            print "Project successfully renamed."
            print "Execute the following to adapt the shell prompt:"
            print "cd ../%s" % new_name