• [ANSI] Re: Mystic Python

    From James Coyle@1:129/215 to Christian Sacks on Wed Feb 20 14:23:52 2019
    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)