pyDoNothing

 

<< Click to Display Table of Contents >>

Navigation:  Nodes > Tasks > Python Templates >

pyDoNothing

 

 

Purpose

 

A very basic Python example. This example creates a simple task node with one input and one output.

 

Inputs

 

Input: Any kind of iles

 

 

Outputs

 

output: The input files, with no modification.

 

Note: this is just the initial template and you can add more connectors as needed.

 

 

Standard properties

 

Object Name

Color

 

 

Python standard properties

code

Schema name

 

NOTE: An introduction to all the Python tools in Mistika Workflows is available in the Python scripting tools section.

 

 

Node specific properties

 

Code: This example creates a Task with one input and one output. On execution, it sends to the output the file name connected to the input (if any). This example does not process the input file. This is the code of this node:

 

from Mistika.classes import Cconnector

 

def init(self):

self.addConnector("input",Cconnector.CONNECTOR_TYPE_INPUT,Cconnector.MODE_OPTIONAL)

self.addConnector("output",Cconnector.CONNECTOR_TYPE_OUTPUT,Cconnector.MODE_OPTIONAL)

return True

 

def isReady(self):

return True

 

def process(self):

input=self.getFirstConnectorByName("input")

output=self.getFirstConnectorByName("output")

output.setUniversalPaths(input.getUniversalPaths())

return True

 

 

Additional documentation:

 

An introduction to all the Python tools in Mistika Workflows is available in the Python scripting tools section.

 

Information about library extension is available in the Mistika Python Extension Library

 

 

 

 

Developer reference (Python - pyDoNothing.[Property ID], API Rest - node/pyDoNothing/property/[Property ID])

 

Property Label

Property ID

Schema Name

schemaName