This section uses simple examples to describe how to create, open, import, or export projects.
Create a project
mBlock-Python Editor provides two ways of creating a project.
1. Choose File > New project.
- In this way, the editor creates a folder and project file, and the project file is stored in the folder.
- The folder is created in the default project path of the editor. You can right-click a project file in the Project Files area and choose Open in resource manager to open the folder.
2. Enter a name for the created folder in the text input box on the toolbar, for example, LED. Rename the project file in the Project Files area, for example, LED1.
Now, you can enter your code. The code is automatically saved.
ClickNew .py file in the Project Files area and enter the file name, for example, LED2.
- The name of the current folder is displayed in the text input box on the toolbar. In this example, the project file is created in the LED folder.
- You can also click New file folder to create a folder for managing project files, putting a file into or taking one out of the folder by dragging and dropping it.
Open recent projects
ChooseFile > Recent project to quickly open a project you have created or edited recently.
The project file is displayed in the Project Files area in the lower left corner.
Choose File > Import project to import a project (a folder, .mcode file, or .zip file) into the editor.
You can't import a single .py file. To import a .py file, you need to put it into a folder first and then import the whole folder.
ChooseFile > Export project to export a project from the editor.
When you choose to export a project, the whole folder where the project file is stored is exported, as an .mcode file.