import zipfile


def list_files_in_zip(zip_file_path, no_directory = True):
  """ list all files/directories inside the given zip_file_path.
      Directories are not included if no_directory is True"""
  entry_list = []
  if not zipfile.is_zipfile(zip_file_path):
    return entry_list
  zip_file = zipfile.ZipFile(zip_file_path, 'r')
  entries =  zip_file.namelist()
  for entry in entries:
    if not no_directory or not entry.endswith("/"):
      entry_list.append(entry)

  #print entry_list
  return entry_list