• Mystic Python

    From Christian Sacks@2:250/5 to All on Wed Feb 20 01:15:37 2019
    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 Wed Feb 20 14:18:53 2019
    .[0m.[1;1H.[1C.[1;34mCS> How do you take input from a user in Mystic Python? .[1CCS> I tried using something like.[B.[33D.[B.[1D.[37mF.[0mrom testpython .[A.[15C.[1;30m..[0mmpy that comes with .[1mM.[0mystic.[B.[42D.[B.[1D.[1;33m .[Adef do_input_demo():.[B.[20D.[B.[1D.[8Cwriteln(".[37;44m Python Demonstra .[A.[34Ction Program > Input Demo|$X79 .[40m").[B.[67D.[B.[1D.[8Cwrite('|CR .[A.[18C.[34mType a string: ');.[B.[36D.[B.[1D.[8Cinput = getstr(11, 40, 120 .[A.[34C, "Default");.[B.[47D.[B.[1D.[8Cwriteln("|CR.[35mEnter characters an .[A.[39Cd press .[0;35m[.[1;37mESCAPE.[0;35m] .[1mwhen done:.[0m|CR").[B.[71D .[8Cwhile not shutdown():.[B.[29D.[B.[1D.[16Cchar, extended = getkey(); .[B.[1D.[16Cif extended:.[B.[28D.[B.[1D.[24Cif char == KEY_UP:.[B.[42D.[32Cw .[A.[33Criteln("you pressed up arrow");.[B.[64D.[24Celif char == KEY_DOWN: .[32Cwriteln("you pressed down arrow");.[B.[66D.[24Celif char == KEY_LEFT: .[32Cwriteln("you pressed left arrow");.[B.[66D.[24Celif char == KEY_RIGHT: .[32Cwriteln("you pressed right arrow");.[B.[67D.[24Celse:.[B.[29D.[32Cwrite .[A.[37Cln("You pressed extended key #" + str(ord(char))).[B.[6D.[B.[1D.[16C .[A.[16Celse:.[B.[21D.[24Cif char == KEY_ESCAPE:.[B.[46D.[32Cwriteln("you pr .[A.[47Cessed ESCAPE");.[B.[62D.[32Cbreak;.[B.[38D.[24Celif char == KEY_ENTE .[A.[45CR:.[B.[47D.[32Cwriteln("you pressed enter");.[B.[61D.[24Celif char = .[A.[35C= KEY_TAB:.[B.[45D.[32Cwriteln("you pressed tab");.[B.[59D.[24Celse: .[32Cwriteln("you pressed character " + char);.[B.[73D
    --- 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 Fri Feb 22 07:26:58 2019
    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)