• python parameters

    From Gryphon@21:1/120 to g00r00 on Wednesday, December 06, 2017 10:25:27
    g00r00,

    I'm testing out the code you had in the whatsnew, for gathering the command-line parameters of the script. Here is what I have: ------------------------------------------
    import mystic_bbs as bbs;

    bbs.writeln ("Number of parameters..: " + str(bbs.param_count()))
    bbs.writeln ("Full command line.....: " + bbs.param_str())
    bbs.writeln ("Script name...........: " + bbs.param_str(0))
    bbs.writeln ("|CRParameters (param_str):|CR")

    count = 0

    while count <= bbs.param_count():
    bbs.writeln (" Param #" + str(count) + ": " + bbs.param_str(count))

    count = count + 1

    bbs.writeln("|CR|PA")
    --------------------------------

    I called the file test1.mpy and ran it as 'test1 one two three'. This is the output:

    Number of parameters..: 4294967295

    PYTHON ERROR (test1.mpy)

    File "test1.mpy", line 4, in <module>
    TypeError: cannot concatenate 'str' and 'NoneType' objects

    Am I doing something wrong?

    --- Mystic BBS v1.12 A36 2017/12/03 (Linux/64)
    * Origin: Cyberia BBS | cyberia.darktech.org | San Jose, CA (21:1/120)
  • From g00r00@21:1/108 to Gryphon on Wednesday, December 06, 2017 18:33:00
    g00r00,

    I'm testing out the code you had in the whatsnew, for gathering the command-line parameters of the script. Here is what I have:

    Looks like I broke it while adding the msg_base stuff. I just fixed it.

    I also added a bunch of message attributes, and a "charxy" function that returns the character and attribute at an X/Y location.

    Let me know what else you need and I will try to get things added for you, otherwise I will just randomly add things when I feel like it :)

    I'll update the Linux/64 prealpha for you now.

    --- Mystic BBS v1.12 A37 2017/12/06 (Windows/32)
    * Origin: Sector 7 [Mystic BBS WHQ] (21:1/108)