Coding – Python Programming in MatDeck

Each MD product includes Python IDE. This is MD Integrated Development Environment – IDE for Python. Python IDE is a smaller part of all MD products. MD products give users the option to take advantage of Python directly in a MD document, without Python IDE and combine multiple other MD features and functions.  Python IDE can be activated by going to File > New > New Python as shown below.

create a new MatDeck document

Except Python IDE, all MD products have C IDE and MD C++ style script IDE (simplified C++) plus MD documents which are more than an IDE – a live document with processing features.

MatDeck Python GUI designer is available in all MD products. Python GUI designer is a GUI environment that features drag and drop GUI elements allowing you to create a graphical user interface for custom applications. The complete GUI designer or Python GUI framework contains an exhaustive list of 19 individual GUI objects/elements that can be placed in visual GUI designer.

Once a user has completed their design, it can generate their entire GUI application in programming code. Depending on which script editor is chosen, the Python GUI framework will generate the code in Python or MatDeck script (which is simplified C++). More about Python GUI Designer

The image below, shows a Python IDE. This type of MD document cannot combine code, text editing and mathematic equations in a single document. However, if needed, Python code can be called into a MatDeck script to allow all features to be utilized.

python in MatDeck document

Combining Python with MD documents means more powerful options where Python is joint with various MD GUIs, functions and features are created. Shown below is Python in MD documents where Python code is initiated with #py and closed with ###.

Advantages from doing this:

  • Reduction in code amount by combining the code with other MD GUIs, features and functions
  • High quality documents  which would not be possible with any programing language

Variables defined in MatDeck script can be exchanged to Python for further processing and returned. There is a type match for MatDeck variables: Boolean, integer, double, complex, string, vector which is interpreted as a Python list. Python type variable is transferred back to MatDeck as a vector. Use of graphics, GUI and widgets make programming more interactive and easier to learn for users.

MatDeck python example

MD Python IDE is shown below. Please have look our Python Examples

MD python IDE


For tips and useful information on how to use the different features in MD Python, use the following manuals: