Last active
November 28, 2019 05:29
-
-
Save yatakeke/1c88715e429f7e21e931b15d5d0739c8 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
from glob import glob | |
from os import path | |
def listup_file_name(data_path, extension=None, abspath=True): | |
extension = '.' + extension if extension else '' | |
if abspath: | |
return glob(data_path + '*' + extension) | |
else: | |
return glob(path.relpath(data_path + '*' + extension)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment