Hey,
I’ve noticed that when debugging an event script, System.* objects (System.String, System.Int32, etc…) don’t seem to have string representations defined for those objects. I’m not 100% sure if these System.* objects are through Deadline or not, but if so, it would be super helpful if we could get a str() and repr() method implemented for these objects or the object’s metaclasses.
Example:
[code]
log.info(“Job.JobFrameList: %s” % (jobObj.JobFrameList))
Job.JobFrameList: System.Int32[/code]
Instead, I’d have to iterate through that object and print out each index to see what it contained.
This could be converted by implementing str() for the System.Int32 class similarly to:
>>>
>>> class MyListObj(object):
... def __init__(self, *args, **kwargs):
... self._list = kwargs.get("list", [])
... def append(self, what):
... self._list.append(what)
... def __str__(self):
... return "[%s]" % (", ".join(str(x) for x in self._list))
...
>>> b = MyListObj()
>>> b.append(1)
>>> b.append(2)
>>> b.append(3)
>>>
>>> print "list contents: %s" % (b)
list contents: [1, 2, 3]
>>>
Thoughts?