Forum: Poser Python Scripting


Subject: Export object file size is zero

Tekitoumen opened this issue on Aug 23, 2022 ยท 8 posts


adp001 posted Wed, 31 August 2022 at 8:22 PM

However, what I do from time to time is to use a function:

def str_eq(sa: str, sb: str) -> bool:
return sa == sb or sa in sb if sa is not None and sb is not None and len(sa) > 0 else False

(Python 3)

The function first tries a standard comparison with "==". Only if this fails, a test with "in" is performed. In addition, the two variables passed (sa and sb) are tested for None.