• Mystic Python

    From Christian Sacks@2:250/5 to All on Wednesday, February 20, 2019 01:15:37
    Howdy y'all,

    How do you take input from a user in Mystic Python?
    I tried using something like

    name = input()

    or

    name = raw_input()

    but it just hangs... what is the function to get user input?

    ---
    Best regards,
    Christian aka MeaTLoTioN

    ── [eml] ml@erb.pw ── [web] www.erb.pw ───┐
    ── [fsx] 21:1/158 ── [tqw] 1337:1/101 ┬──┘
    ── [rtn] 80:774/81 ── [fdn] 2:250/5 ───┘

    --- Mystic BBS v1.12 A43 2019/02/10 (Linux/64)
    * Origin: The Quantum Wormhole, Ramsgate, UK. bbs.erb.pw (2:250/5)
  • From James Coyle@1:129/215 to Christian Sacks on Wednesday, February 20, 2019 14:18:53
    How do you take input from a user in Mystic Python?
    I tried using something likeFrom testpython
    .mpy that comes with Mystic
    def do_input_demo():writeln(" Python Demonstra
    tion Program > Input Demo|$X79 ")write('|CR
    Type a string: ');input = getstr(11, 40, 120
    , "Default");writeln("|CREnter characters an
    d press [ESCAPE] when done:|CR")
    while not shutdown():char, extended = getkey();
    if extended:if char == KEY_UP:w
    riteln("you pressed up arrow");elif char == KEY_DOWN:
    writeln("you pressed down arrow");elif char == KEY_LEFT:
    writeln("you pressed left arrow");elif char == KEY_RIGHT:
    writeln("you pressed right arrow");else:write
    ln("You pressed extended key #" + str(ord(char)))
    else:if char == KEY_ESCAPE:writeln("you pr
    essed ESCAPE");break;elif char == KEY_ENTE
    R:writeln("you pressed enter");elif char =
    = KEY_TAB:writeln("you pressed tab");else:
    writeln("you pressed character " + char);
    --- Mystic BBS v1.12 A43 2019/02/17 (Linux/64)
    * Origin: Sector 7 (1:129/215)
  • From Gryphon@1:106/324 to Christian Sacks on Friday, February 22, 2019 07:26:58
    On 20 Feb 2019 &4, Christian Sacks said the following...

    Howdy y'all,

    How do you take input from a user in Mystic Python?
    I tried using something like

    name = input()

    or

    name = raw_input()

    but it just hangs... what is the function to get user input?

    Are you using PY or MPY? If you're running mpy, then it shold be:

    name = getstr(11,40,120,"Default"

    Have a look at testpython.mpy in the scripts directory for more information.

    --- Mystic BBS v1.12 A42 2019/02/01 (Linux/64)
    * Origin: Cyberia BBS | cyberiabbs.zapto.org | San Jose, CA (1:106/324)