pub fn py_vers() -> Version {
    print_color(
        "Please enter the Python version for this project: (eg: 3.8)",
        Color::Magenta,
    );
    let default_ver = default_python();
    print!("Default [{}]:", default_ver);
    std::io::stdout().flush().unwrap();
    let mut input = String::new();
    io::stdin()
        .read_line(&mut input)
        .expect("Unable to read user input for version");

    input.pop(); // Remove trailing newline.
    let input = input.replace("\n", "").replace("\r", "");
    if !input.is_empty() {
        fallible_v_parse(&input)
    } else {
        default_ver
    }
}
/// Ask the user what Python version to use.
Ask the user what Python version to use.
Ask the user what Python version to use .
pub fn py_vers() -> Version {
    print_color(
        "Please enter the Python version for this project: (eg: 3.8)",
        Color::Magenta,
    );
    let default_ver = default_python();
    print!("Default [{}]:", default_ver);
    std::io::stdout().flush().unwrap();
    let mut input = String::new();
    io::stdin()
        .read_line(&mut input)
        .expect("Unable to read user input for version");
    input.pop(); // Remove trailing newline.
    let input = input.replace("\n", "").replace("\r", "");
    if !input.is_empty() {
        fallible_v_parse(&input)
    } else {
        default_ver
    }
}
pub fn py_vers ( ) -> Version { print_color ( " " , Color :: Magenta , ) ; let default_ver = default_python ( ) ; print ! ( " " default_ver ) ; std :: io :: stdout ( ) . flush ( ) . unwrap ( ) ; let mut input = String :: new ( ) ; io :: stdin ( ) . read_line ( & mut input ) . expect ( " " ) ; input . pop ( ) ; // Remove trailing newline. let input = input . replace ( " \n " , " " ) . replace ( " \r " , " " ) ; if ! input . is_empty ( ) { fallible_v_parse ( & input ) } else { default_ver } }
Ask the user what Python version to use.
Ask the user what Python version to use .