Created
February 1, 2018 07:37
-
-
Save syanle/4d78ea44b5b2f296a0ce7a1b0cd663c3 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
def valid_file(param): | |
base, ext = os.path.splitext(param) | |
if ext.lower() not in ('.tsv', '.tab'): | |
raise argparse.ArgumentTypeError('File must have a tsv or tab extension') | |
return param |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment