parameters: (del_dir)
docstring: Delete all files and directories under 'del_dir', preserving 'del_dir'.
docstring_summary: Delete all files and directories under 'del_dir', preserving 'del_dir'.
docstring_tokens: Delete all files and directories under del_dir preserving del_dir .
function: def delete_directory_content(del_dir):
    """Delete all files and directories under 'del_dir', preserving 'del_dir'."""
    for name in os.listdir(del_dir):
      path = os.path.join(del_dir, name)
      if os.path.isdir(path):
        shutil.rmtree(path)
      else:
        os.remove(path)
function_tokens: def delete_directory_content ( del_dir ) : for name in os . listdir ( del_dir ) : path = os . path . join ( del_dir , name ) if os . path . isdir ( path ) : shutil . rmtree ( path ) else : os . remove ( path )