Add default argument value support

This commit is contained in:
Carson Katri 2022-11-14 18:31:26 -05:00
commit c28d6ced93
9 changed files with 107 additions and 43 deletions

9
absolute_path.py Normal file
View file

@ -0,0 +1,9 @@
import os
def absolute_path(component):
"""
Returns the absolute path to a file in the addon directory.
Alternative to `os.abspath` that works the same on macOS and Windows.
"""
return os.path.join(os.path.dirname(os.path.realpath(__file__)), component)