def get_pathext(default_pathext=None):
 if (default_pathext is None):
  default_pathext = os.pathsep.join([u'.COM', u'.EXE', u'.BAT', u'.CMD'])
 return os.environ.get(u'PATHEXT', default_pathext)

def get_pathext ( default_pathext = None ) : if ( default_pathext is None ) : default_pathext = os . pathsep . join ( [ u'.COM' , u'.EXE' , u'.BAT' , u'.CMD' ] ) return os . environ . get ( u'PATHEXT' , default_pathext )
returns the path extensions from environment or a default .