Python coding mode in Mind+
Switch to the Python coding mode
If you are familiar with the Petoi coding blocks and Python language, you can change to the Code mode in Mind+ as follows:


The Code mode is a Python 3 development environment. You can write any Python script in it and call all the PetoiRobot library APIs imported by Mind+.
You can find the PetoiRobot library in the following directory. There are all the definitions of API interfaces in the robot.py
Windows C:\Users\{username}\AppData\Local\DFScratch\extensions\petoi-robot-thirdex\python\libraries\PetoiRobot\robot.py
MacOS /Users/{username}/Library/DFScratch/extensions/petoi-robot-thirdex/python/libraries/PetoiRobot/robot.py
Here is a sample code :
You can also copy the code in the Auto-Generate area in the Blocks mode and then paste it into the code file in the Code mode. Then you can edit and run the code.
Last updated