Hi,
If you defined a global variable, it can be accessed in Shutdown Pytoh Script.
-----
# Example: PythonCaller script
import fmeobjects
# Define a global variable.
g_errorCount = 0
class FeatureProcessor(object):
def __init__(self):
pass
def input(self, feature):
try:
# Do something.
except:
# When an error occurred, increase error count.
global g_errorCount
g_errorCount += 1
def close(self):
pass
-----
Takashi
Hi,
here's an example using a class instance variable rather than a global variable.
Example:
---
import fmeobjects
class FeatureProcessor(object):
def __init__(self):
self.exception_count = 0
def input(self, feature):
try:
# Do something.
except:
# When an error occurrs, increase error count
self.exception_count += 1
def close(self):
if self.exception_count > 0:
# Send a mail here...
---
David
Thanks guys. The class instance variable works bette
'Kemi