< All Topics

Getting ready to write scripts

If you’re interested in writing scripts within Muk3D there are a couple of things you should do beforehand.

Familiarise yourself with Python

Muk3D currently uses Python v2.7 as its scripting language.  There are many great resources on the web for learning Python.

The Python Standard Library refers to the libraries that come standard with a Python installation.  The reference guide for it can be found at https://docs.python.org/2/library/ 

Text editor

Notepad.exe is not suitable for editing script files.  Writing Python code usually requires lots of indentation (indentation is used to denote code blocks in Python, much the same way as {} does in C/C++/Java). Syntax formatting is nice to have too.

Our recommended text editor is Notepad++ (you can get it here).

The first thing to do in Notepad++ is to make sure that if Tab is pressed (when indenting code) the tab character is replaced with spaces. Go to Settings/Preferences and the Language option.

Make sure that the Tab size is 4 and Replace by space is checked.

If your document already has Tab characters in it and you want to replace them with spaces, you can select the relevant text and run Edit/Blank operations/TAB to Space.

Table of Contents