Finally getting used to the syntax,

What was really stumbling me was mainly trying to add numbers as parts of speech, but it was easy enough to turn these back into strings, and then display it normally.

The flow is extremely similar to Ruby:



# Submission based emotions.

def attraction():

  print("I do accept.")


def trust():

  print("I do trust")


def acceptance():

  print("I do accept")


attract, trust, accept = attraction(), trust(), acceptance()



Obviously you wouldn't play the emotions in order like that in an actual scenario, but it was a place seeing how the command line works here.

The main struggle seems to be getting used to not using end statements.

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
AutonomicPerfectionist's picture


Hi, and welcome!

So for MyRobotLab, we currently have a primary scripting engine for Python (the one you're using) using the Jython interpreter. I believe we also have a Javascript interpreter (needs a lot of work to get it to the level of polish that Python is at), and the rest of the system is written in Java. If you find you would like to encapsulate your work in a service, you will currently need to know Java but hopefully we'll be able to someday program services in other languages too, otherwise the Python interpreter is a great starting point.

If you're having troubles figuring out the syntax there are some great tutorials online (personally I prefer If you'd like to use Python libraries for your work, however, you'll need to only use pure-python libraries and place them in a folder in the MRL install directory (should be more information on this on the service documentation page), most tutorials will tell you to install a package with Pip but because MRL uses Jython that won't work. If you have any other questions feel free to ask!