8.16.0.1
get-pass
This package was inspired by Python’s getpass module.
(require get-pass) | package: get-pass |
procedure
prompt : string? = "password: " in : input-port? = (current-input-port) out : output-port? = (current-output-port)
Displays prompt on out. Accepts input on in without echoing input.
Using the below code in get-a-password.rkt
#lang racket (require get-pass) (define pass (get-pass "What's your password? ")) (newline) (displayln (string-append "Your password is " pass))
will result in the following at the terminal if 1234 is entered at the prompt.
$ racket get-a-password.rkt What's your password? # "1234" is entered at the prompt, but it is not displayed! Your password is 1234 $