I’m looking at checking for a specific type of class within a Scripting package in Python and would like some error checking and type checking built-in (at least during development)
So in the past I would use assert and isType for this purpose, making sanity checks for passed objects to the library.
I’m running into a wall when trying to specify PyDataSets as types though.
maquinas = system.db.runPrepQuery(machq, ,'tablas') listo =  print type(listo) if type(listo) == list: print "List!!" else: print "Not a list!" print type(maquinas) if type(maquinas) == com.inductiveautomation.ignition.common.script.builtin.DatasetUtilities$PyDataSet: print "Machine!!" else: print "Not a Machine!!"
The second example seems to break the function.
Any direction would be great.I can definitely work around this (and I will) but it’s going to be a nagging voice in the back of my head I’d like to quell.