• MPY password?

    From maskreet@21:1/114 to g00r00 on Tue Mar 12 20:50:36 2019
    Was just wondering if Python allows a password prompt, where it obscures the password typed with a character of my choosing? I could have *sworn* I saw something that had that in my search for stuff.

    If not, is there a way to do that with just the write command?

    --- Mystic BBS v1.12 A43 2019/02/23 (Raspberry Pi/32)
    * Origin: throwbackbbs.com -\- meriden, ct -\- (21:1/114)
  • From Gryphon@21:1/120 to maskreet on Fri Mar 15 14:04:20 2019
    On 12 Mar 2019 &4, maskreet said the following...

    Was just wondering if Python allows a password prompt, where it obscures the password typed with a character of my choosing? I could have *sworn*
    I saw something that had that in my search for stuff.

    If not, is there a way to do that with just the write command?

    If you use the MPY getstr,it has pretty much the same functionality as the
    MPL INPUT function, except that some of the input values are swapped around.

    If you look at the MPLDEMO.MPL file in the InputDemo prodedure, you can see that you an specify the kinds of input that you get.

    getstr(input type, screen width, field width, default text)

    The input type could:

    11 = Regular Input
    12 = CAPS Input
    13 = Proper Input
    14 = Phone Input
    15 = DATE input
    16 = Password Input

    So in your case, you'll want 16 for the input type. With a screen length of
    12 and a field length of 32, the function call would look like:

    str1 = getstr(16,12,32,"")

    Also, this creates a colored input background, which uses your default
    settings in the themes. If you subtract 10 from those values, it just uses
    the black background.

    Hope that helps!

    --- Mystic BBS v1.12 A43 2019/03/02 (Linux/64)
    * Origin: Cyberia BBS | cyberiabbs.zapto.org | San Jose, CA (21:1/120)
  • From maskreet@21:1/114 to Gryphon on Fri Mar 15 18:04:48 2019
    On 15 Mar 2019, Gryphon said the following...

    getstr(input type, screen width, field width, default text)

    The input type could:

    11 = Regular Input
    12 = CAPS Input
    13 = Proper Input
    14 = Phone Input
    15 = DATE input
    16 = Password Input

    Awesome, thanks! I knew it was somewhere, I just couldn't remember where. LIFESAVER. =)

    --- Mystic BBS v1.12 A43 2019/02/23 (Raspberry Pi/32)
    * Origin: throwbackbbs.com -\- meriden, ct -\- (21:1/114)
  • From MeaTLoTioN@21:1/158 to Gryphon on Sat Mar 16 08:14:32 2019
    getstr(input type, screen width, field width, default text)

    The input type could:

    11 = Regular Input
    12 = CAPS Input
    13 = Proper Input
    14 = Phone Input
    15 = DATE input
    16 = Password Input

    Is there a way to customize an input (or add a new type)? For eg... regular input is whatever the user types, CAPS input being whatever the user types,
    but it will always be in CAPS, proper output I guess would be each and every word will be capitalized i.e. the first letter is capitol and the rest lower for each word... Can you make your own style? If so, how does one do that?

    I have ideas for an extra Phone input plus a brand new input that I have an idea for.

    ---
    |14Best regards,
    |11Ch|03rist|11ia|15n |11a|03ka |11Me|03aTLoT|11io|15N

    |07ÄÄ |08[|10eml|08] |15ml@erb.pw |07ÄÄ |08[|10web|08] |15www.erb.pw |07ÄÄÄ¿ |07ÄÄ |08[|09fsx|08] |1521:1/158 |07ÄÄ |08[|11tqw|08] |151337:1/101 |07ÂÄÄÙ |07ÄÄ |08[|12rtn|08] |1580:774/81 |07ÄÂ |08[|14fdn|08] |152:250/5 |07ÄÄÄÙ
    |07ÄÄ |08[|10ark|08] |1510:104/2 |07ÄÙ

    --- Mystic BBS v1.12 A43 2019/03/02 (Linux/64)
    * Origin: The Quantum Wormhole, Ramsgate, UK. bbs.erb.pw (21:1/158)
  • From g00r00@21:1/108 to maskreet on Sun Mar 17 19:31:04 2019
    Was just wondering if Python allows a password prompt, where it obscures the password typed with a character of my choosing? I could have *sworn*
    I saw something that had that in my search for stuff.

    If not, is there a way to do that with just the write command?

    Yes, getstr has a mode option (the first parameter passed)

    input modes:
    1 = standard input
    2 = upper case
    3 = proper case (First Letter Each Word)
    4 = usa phone number
    5 = date (users date input format then converted to MM/DD/YY)
    6 = password
    7 = forced lower case
    8 = user defined input
    9 = standard input with no CRLF
    10 = numbers only (and . + -)

    --- Mystic BBS v1.12 A43 2019/03/02 (Linux/64)
    * Origin: Sector 7 (21:1/108)