|
<< Click to Display Table of Contents >> Navigation: Nodes > Tasks > Python Templates > pyDoNothing
|
A very basic Python example. This example creates a simple task node with one input and one output.
Input: Any kind of iles
output: The input files, with no modification.
Note: this is just the initial template and you can add more connectors as needed.
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
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
Property Label |
Property ID |
Schema Name |
schemaName |