def is_dos_short_file_name(file):
    """ Examine if the given file is in the 8.3 form.
    """
    fname, ext = os.path.splitext(file)
    proper_ext = len(ext) == 0 or (2 <= len(ext) <= 4) # the ext contains the dot
    proper_fname = file.isupper() and len(fname) <= 8

    return proper_ext and proper_fname
def is_dos_short_file_name ( file ) : fname , ext = os . path . splitext ( file ) proper_ext = len ( ext ) == 0 or ( 2 <= len ( ext ) <= 4 ) proper_fname = file . isupper ( ) and len ( fname ) <= 8 return proper_ext and proper_fname
Examine if the given file is in the 8.3 form.