Add default argument value support
This commit is contained in:
parent
7dc083e361
commit
c28d6ced93
9 changed files with 107 additions and 43 deletions
9
absolute_path.py
Normal file
9
absolute_path.py
Normal 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)
|
||||
Reference in a new issue