Forum: Poser Python Scripting


Subject: Useful Code Snippets

structure opened this issue on Jun 27, 2019 ยท 94 posts


adp001 posted Sat, 05 December 2020 at 3:23 PM

Or in short (and without the use of a library):

has_ext = lambda path: path.rfind(".") != -1

hasext("myown/directory/file")
# says: False
hasext("myown/directory/file.txt")
# says: True