def _win32_dir(path, star='<STR_LIT>'):
from ubelt import util_cmd<EOL>import re<EOL>wrapper = '<STR_LIT>'  <EOL>command = '<STR_LIT>'.format(path, star)<EOL>wrapped = wrapper.format(command)<EOL>info = util_cmd.cmd(wrapped, shell=True)<EOL>if info['<STR_LIT>'] != <NUM_LIT:0>:<EOL><INDENT>from ubelt import util_format<EOL>print('<STR_LIT>')<EOL>print(info['<STR_LIT>'])<EOL>print(util_format.repr2(info, nl=<NUM_LIT:1>))<EOL>raise OSError(str(info))<EOL><DEDENT>lines = info['<STR_LIT>'].split('<STR_LIT:\n>')[<NUM_LIT:5>:-<NUM_LIT:3>]<EOL>splitter = re.compile('<STR_LIT>')<EOL>for line in lines:<EOL><INDENT>parts = splitter.split(line)<EOL>date, sep, time, sep, ampm, sep, type_or_size, sep = parts[:<NUM_LIT:8>]<EOL>name = '<STR_LIT>'.join(parts[<NUM_LIT:8>:])<EOL>if name == '<STR_LIT:.>' or name == '<STR_LIT:..>':<EOL><INDENT>continue<EOL><DEDENT>if type_or_size in ['<STR_LIT>', '<STR_LIT>', '<STR_LIT>']:<EOL><INDENT>pos = name.find('<STR_LIT::>')<EOL>bpos = name[:pos].rfind('<STR_LIT:[>')<EOL>name = name[:bpos - <NUM_LIT:1>]<EOL>pointed = name[bpos + <NUM_LIT:1>:-<NUM_LIT:1>]<EOL>yield type_or_size, name, pointed<EOL><DEDENT>else:<EOL><INDENT>yield type_or_size, name, None<EOL><DEDENT><DEDENT>
Using the windows cmd shell to get information about a directory