Last active
March 9, 2019 17:40
-
-
Save teionn/e2bddc2601c36babb094b81e04144924 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
def split_path(path): | |
_dir, _file = os.path.split(path) | |
_name, _ext = os.path.splitext(_file) | |
return _dir.replace(os.sep,"/"), _name, _ext | |
split_path("C:/Program Files/Autodesk/Maya2018/bin/maya.exe") | |
# Result: ('C:/Program Files/Autodesk/Maya2018/bin', 'maya', '.exe') # |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment