I made a Python-with-Evennia tutorial (looking for feedback)


  • Coder

    https://github.com/evennia/evennia/wiki/Python-basic-introduction

    Since many people coming to Evennia are not previously familiar with Python (or any programming in some cases) I put together a tutorial for the absolute Python beginner that just got Evennia up and running. It explores some basic Python concepts using Evennia as well as helps the budding developer start finding their way with concepts like imports, object inheritance and overriding. After previous feedback it was split in two parts since it's pretty chunky to do in one sitting.

    Obviously a short tutorial can't do more than graze the surface of Python and general programming concepts. This won't teach you Python. But it covers some of the most common questions and initial hurdles newcomers tend to ask about in a format that is, while technical, hopefully not too hard to follow when getting started.

    If you follow it and have feedback on further improvements, let me know!
    .
    Griatch


  • Tutorialist

    @griatch THANK YOU



  • @griatch This is good stuff. I've been playing with Evennia and reading over all the documentation and you guys have done a great job.


  • Pitcrew

    Reading that makes me foolishly optimistic about learning Python and being able to self-sufficiently run a game. So well done there!


  • Coder

    The purist in me balks at describing print as a function; its a statement in Python 2 without a future import. That you can call a statement with parens around its arguments is just an accident of the fact you can put parens about nearly anything in Python. Its a function of parens are grouping syntax, and they don't make tuples-- commas do.

    Otherwise, looks good :)


  • Coder

    Thanks for the nice comments, glad to hear it could be useful to people!

    @cobaltasaurus said in I made a Python-with-Evennia tutorial (looking for feedback):

    @griatch THANK YOU

    You are welcome!

    @thatonedude said in I made a Python-with-Evennia tutorial (looking for feedback):

    @griatch This is good stuff. I've been playing with Evennia and reading over all the documentation and you guys have done a great job.

    Glad you think so. :)

    @bad-at-lurking said in I made a Python-with-Evennia tutorial (looking for feedback):

    Reading that makes me foolishly optimistic about learning Python and being able to self-sufficiently run a game. So well done there!

    Python is often considered one of the simpler mainstream languages to learn and we have plenty or people learning Python/programming through Evennia actually. So it's certainly doable!

    @ixokai said in I made a Python-with-Evennia tutorial (looking for feedback):

    The purist in me balks at describing print as a function; its a statement in Python 2 without a future import. That you can call a statement with parens around its arguments is just an accident of the fact you can put parens about nearly anything in Python. Its a function of parens are grouping syntax, and they don't make tuples-- commas do.

    Thanks for the feedback! This exception to print is mentioned in the immediately following paragraph but yes, calling it a 'function' is indeed technically incorrect. I didn't think this was something a complete newbie would gain much from learning out the door. I felt it better to learn calling print as a (sort-of) function from the get-go so that the concept of a function was introduced early and can be referenced later in the tutorial when a real function is created.
    .
    Griatch


  • Coder

    @ixokai said in I made a Python-with-Evennia tutorial (looking for feedback):

    The purist in me balks at describing print as a function; its a statement in Python 2 without a future import. That you can call a statement with parens around its arguments is just an accident of the fact you can put parens about nearly anything in Python. Its a function of parens are grouping syntax, and they don't make tuples-- commas do.

    Thanks for the feedback! This exception to print is mentioned in the immediately following paragraph but yes, calling it a 'function' is indeed technically incorrect. I didn't think this was something a complete newbie would gain much from learning out the door. I felt it better to learn calling print as a (sort-of) function from the get-go so that the concept of a function was introduced early and can be referenced later in the tutorial when a real function is created.

    Honestly, I wonder if the first thing you'd teach is me.msg -- and only teach print in an advanced mode about debugging. Because what is the classical 'first thing' anyone learns in a programming language? How to print out a statement and see the result. In Evennia, that's not print, that's me.msg.

    me.msg("Hello world!") is really Evennia's version of the first programming exercise for every language ever.


  • Coder

    @ixokai said in I made a Python-with-Evennia tutorial (looking for feedback):

    @ixokai said in I made a Python-with-Evennia tutorial (looking for feedback):

    The purist in me balks at describing print as a function; its a statement in Python 2 without a future import. That you can call a statement with parens around its arguments is just an accident of the fact you can put parens about nearly anything in Python. Its a function of parens are grouping syntax, and they don't make tuples-- commas do.

    Thanks for the feedback! This exception to print is mentioned in the immediately following paragraph but yes, calling it a 'function' is indeed technically incorrect. I didn't think this was something a complete newbie would gain much from learning out the door. I felt it better to learn calling print as a (sort-of) function from the get-go so that the concept of a function was introduced early and can be referenced later in the tutorial when a real function is created.

    Honestly, I wonder if the first thing you'd teach is me.msg -- and only teach print in an advanced mode about debugging. Because what is the classical 'first thing' anyone learns in a programming language? How to print out a statement and see the result. In Evennia, that's not print, that's me.msg.

    me.msg("Hello world!") is really Evennia's version of the first programming exercise for every language ever.

    The use of print is there because people somewhat familiar with Python will usually try it first and wonder why nothing happens. It also makes sure newcomers early learn to look at the console since that's where many errors will show up (we've found it's common for beginners to hide/close this window and not realize this source of info exists when they get errors). But yeah, the immediately visible output of me.msg() is indeed more matching the traditional Hello World! example.
    .
    Griatch


 

Looks like your connection to MU Soapbox was lost, please wait while we try to reconnect.