• MPY password?

    From maskreet@21:1/114 to g00r00 on Tuesday, March 12, 2019 21:50:36
    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 Friday, March 15, 2019 15:04:20
    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 Friday, March 15, 2019 19:04:49
    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 Saturday, March 16, 2019 09:14:33
    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 Sunday, March 17, 2019 20:31:05
    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)
  • From Gryphon@21:1/120 to MeaTLoTioN on Tuesday, March 19, 2019 10:37:17
    On 16 Mar 2019 &4, MeaTLoTioN 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

    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.

    I would hazzard to guess that you can write your own input function that will do what you are asking. Otherwise, you'll have to ask g00r00 to modify the getstr() function according to your ideas.

    --- Mystic BBS v1.12 A43 2019/03/02 (Linux/64)
    * Origin: Cyberia BBS | cyberiabbs.zapto.org | San Jose, CA (21:1/120)
  • From Gryphon@21:1/120 to g00r00 on Tuesday, March 19, 2019 10:45:11
    On 17 Mar 2019 &4, g00r00 said the following...

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

    input modes:
    8 = user defined input

    I'm curious what this "user defined input" options is and does.

    --- Mystic BBS v1.12 A43 2019/03/02 (Linux/64)
    * Origin: Cyberia BBS | cyberiabbs.zapto.org | San Jose, CA (21:1/120)
  • From MeaTLoTioN@21:1/158 to Gryphon on Tuesday, March 19, 2019 20:27:10
    input modes:
    8 = user defined input

    I'm curious what this "user defined input" options is and does.

    Me too, that might do what I want it to do =)

    ---
    |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 Gryphon on Saturday, March 23, 2019 23:05:23
    Yes, getstr has a mode option (the first parameter passed)

    input modes:
    8 = user defined input

    I'm curious what this "user defined input" options is and does.

    I think it uses the user name format as defined in the new user settings.

    --- Mystic BBS v1.12 A43 2019/03/02 (Linux/64)
    * Origin: Sector 7 (21:1/108)
  • From g00r00@21:1/108 to MeaTLoTioN on Saturday, March 23, 2019 23:05:46
    I'm curious what this "user defined input" options is and does.

    Me too, that might do what I want it to do =)

    You said you wanted proper capitalization and USA numbers right? It does that already!

    The problem with the input function is that we're stuck with only 10 types of input. If I were to expand on that, it'd possibly break the input of old MPL programs. :(

    I do want to add more things to it, but I am not sure what the impact will be on existing MPL programs.

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