Python integration

MetaPiping offers to users the possibility to manipulate data produced by the software in order to operate custom treatment.

These manipulations can be done via Python scripts. Python is a simple and well documented language, appreciated by engineers, with great free mathematical, scientific and computer libraries.

A script contains one or more *.py files and can use a python virtual environment.

Main.py is mantadory and represents the main access to the script.

ATTENTION, the use of libraries takes place on the disk ! To be used with care.

ATTENTION, MetaPiping natively uses Python 3.7.

Script types

The integration can be done at 3 different levels :

Select Python in the application ribbon :

Image

On the upper left menu, a list of buttons proposes several tools :

  1. Create a folder
  2. Create a script
  3. Remove the selected script or folder
  4. Export a script - See Pyckage page for more information
  5. Import a script - See Pyckage page for more information

When you create a script, select the type of script :

Image

Screen

The screen is made up of different parts :

Image

  1. The list of all scripts (of all types)
  2. The files (and directories) used in the script - selecting a file shows it in the editor (6)
  3. The properties of the script (Type, Name, Input, Output…)
  4. The requirements.txt of the virtual environment of the script (if used)
  5. The chatGPT help - See chatGPT page for more information
  6. The Python Editor - or image viewer if you select an image in the file explorer (2)

ATTENTION : The installation of libraries and the chatGPT help need an internet connection !


Table of contents


Copyright CWANTIC